update fuzz
This commit is contained in:
parent
91b1d607bc
commit
3dd1874652
@ -99,7 +99,9 @@ Install the `honggfuzz` binary (distro package or source). Point it at a binary
|
||||
|
||||
## CI smoke
|
||||
|
||||
GitHub Actions (`.github/workflows/fuzz-smoke.yml`) builds all targets with sanitizer `none`, then runs **`scripts/fuzz-libfuzzer.sh`** with **`FUZZ_RUNS=2000`** so every target gets a short fixed-iteration smoke (same idea as below).
|
||||
GitHub Actions (`.github/workflows/fuzz-smoke.yml`) builds all targets with sanitizer `none`, then runs **`scripts/fuzz-libfuzzer.sh`** with **`FUZZ_RUNS=2000`** so every registered fuzz target gets a short fixed-iteration smoke (same idea as below).
|
||||
|
||||
`scripts/fuzz-libfuzzer.sh` discovers targets dynamically from `cargo fuzz list`, so adding a new `[[bin]]` fuzz target in `fuzz/Cargo.toml` automatically includes it in local and CI smoke runs.
|
||||
|
||||
Locally you can match that with:
|
||||
|
||||
|
||||
2
fuzz/Cargo.lock
generated
2
fuzz/Cargo.lock
generated
@ -709,7 +709,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zkac"
|
||||
version = "0.5.1"
|
||||
version = "0.7.0"
|
||||
dependencies = [
|
||||
"blake2",
|
||||
"chacha20poly1305",
|
||||
|
||||
@ -22,14 +22,19 @@ FUZZ_TIME="${FUZZ_TIME:-60}"
|
||||
FUZZ_RUNS="${FUZZ_RUNS:-}"
|
||||
SANITIZER="${SANITIZER:-none}"
|
||||
|
||||
TARGETS=(
|
||||
handshake_respond
|
||||
handshake_initiator_complete
|
||||
session_decrypt
|
||||
replay_sequence
|
||||
crypto_deserialize
|
||||
bbs_verify_presentation
|
||||
)
|
||||
discover_targets() {
|
||||
local list
|
||||
# `cargo fuzz list` reflects the targets registered in `fuzz/Cargo.toml`.
|
||||
# Keep target discovery dynamic so CI fuzz-smoke automatically covers new code.
|
||||
list="$(cargo fuzz list)"
|
||||
if [[ -z "$list" ]]; then
|
||||
echo "No fuzz targets found via 'cargo fuzz list'." >&2
|
||||
exit 1
|
||||
fi
|
||||
while IFS= read -r line; do
|
||||
[[ -n "$line" ]] && printf '%s\n' "$line"
|
||||
done <<<"$list"
|
||||
}
|
||||
|
||||
run_one() {
|
||||
local name="$1"
|
||||
@ -47,7 +52,7 @@ if [[ $# -gt 0 ]]; then
|
||||
run_one "$name"
|
||||
done
|
||||
else
|
||||
for name in "${TARGETS[@]}"; do
|
||||
while IFS= read -r name; do
|
||||
run_one "$name"
|
||||
done
|
||||
done < <(discover_targets)
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user