mirror of
https://github.com/uutils/grep.git
synced 2026-06-10 16:15:11 -07:00
9598faf708
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).
34 lines
728 B
TOML
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
|