bytecodealliance / bytecodealliance/wit-bindgen
Test Suggestion: Add Fuzzing Tests
- Vorherrschende Sprache
- Rust
- Sterne
- 1.5k
- Forks
- 286
- Ø Merge
- 6 Std. 32 Min.
- Gemergte PRs (30 T.)
- 19
Beschreibung
Fuzz testing is testing mechanism that involves providing pseudo-random data as input into the generators to find correctness issues. There are multiple Bytecode Alliance projects that heavily leverage fuzz testing to improve code quality and find security and correctness issues (e.g. `wasmtime` and `wasm-tools`). So far, there is no fuzz testing existing in this repo. Part of the reasons applying fuzz testing against `wit-bindgen` repo is to raise the bar for generator code quality across multiple languages.
The goal of this issue is to suggest a fuzz framework adding to this repo. It could be as simply as feeding generated valid WIT packages to each `wit-bindgen` generator and check if the generated code are buildable. As the `wit-bindgen-go` maintainer, I hope there is a continuous fuzzing running in the background and invokes `TinyGo` compiler to compile generated WIT bindings. It could go as difficult as making sure the generated code is "correct" - the compiled Wasm modules / components are correct to our expectations.
To get started, I propose to use [`wit-smith`](https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wit-smith) and [`libfuzzer-sys`](https://github.com/rust-fuzz/libfuzzer) crate and `cargo-fuzz` tool for fuzz testing.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit der Überprüfung des vorgeschlagenen wit-smith-, libfuzzer-sys- und cargo-fuzz-Ansatzes und untersuche anschließend, wie dieses Repository jeden wit-bindgen-Generator ausführt und welche bestehenden Build-Prüfungen vorhanden sind. Lege einen klar abgegrenzten anfänglichen Umfang fest, etwa das Generieren gültiger WIT-Pakete und das Kompilieren der generierten Bindings mit TinyGo; der Abschluss sollte ein reproduzierbares Fuzz-Ziel und eine kontinuierliche Ausführung umfassen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- go, rust
- Bereich
- compilers, testing-qa
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100