Files
Sylvestre Ledru 9598faf708 fuzz: add differential fuzzer against GNU grep
Add a cargo-fuzz harness (fuzz_grep) that runs uu_grep and GNU grep on
the same generated args/input and panics on any divergence, using the
vendored uufuzz crate (adapted from uutils/coreutils to depend on
crates.io uucore rather than a path).

A CI workflow (.github/workflows/fuzzing.yml) builds the uufuzz
examples, builds the fuzzer, and runs it for 60s. fuzz_grep is marked
should_pass: false / continue-on-error since it currently surfaces real
GNU-compatibility gaps (e.g. uu_grep rejects a repeated -m, GNU accepts).
2026-06-02 10:13:13 +02:00

34 lines
728 B
TOML

[package]
name = "uu_grep-fuzz"
version = "0.0.0"
description = "uutils ~ 'grep' fuzzers"
repository = "https://github.com/microsoft/uutils-grep/tree/main/fuzz/"
edition = "2024"
rust-version = "1.88.0"
license = "MIT"
publish = false
[package.metadata]
cargo-fuzz = true
# Prevent this from interfering with the parent workspace
[workspace]
members = ["."]
# Enable debug symbols in release builds for readable backtraces
# when fuzzing discovers crashes.
[profile.release]
debug = true
[dependencies]
libfuzzer-sys = "0.4.7"
rand = { version = "0.10.1", features = ["std_rng"] }
uufuzz = { path = "uufuzz" }
uu_grep = { path = ".." }
[[bin]]
name = "fuzz_grep"
path = "fuzz_targets/fuzz_grep.rs"
test = false
doc = false