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
|
## 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:
|
Locally you can match that with:
|
||||||
|
|
||||||
|
|||||||
2
fuzz/Cargo.lock
generated
2
fuzz/Cargo.lock
generated
@ -709,7 +709,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zkac"
|
name = "zkac"
|
||||||
version = "0.5.1"
|
version = "0.7.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"blake2",
|
"blake2",
|
||||||
"chacha20poly1305",
|
"chacha20poly1305",
|
||||||
|
|||||||
@ -22,14 +22,19 @@ FUZZ_TIME="${FUZZ_TIME:-60}"
|
|||||||
FUZZ_RUNS="${FUZZ_RUNS:-}"
|
FUZZ_RUNS="${FUZZ_RUNS:-}"
|
||||||
SANITIZER="${SANITIZER:-none}"
|
SANITIZER="${SANITIZER:-none}"
|
||||||
|
|
||||||
TARGETS=(
|
discover_targets() {
|
||||||
handshake_respond
|
local list
|
||||||
handshake_initiator_complete
|
# `cargo fuzz list` reflects the targets registered in `fuzz/Cargo.toml`.
|
||||||
session_decrypt
|
# Keep target discovery dynamic so CI fuzz-smoke automatically covers new code.
|
||||||
replay_sequence
|
list="$(cargo fuzz list)"
|
||||||
crypto_deserialize
|
if [[ -z "$list" ]]; then
|
||||||
bbs_verify_presentation
|
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() {
|
run_one() {
|
||||||
local name="$1"
|
local name="$1"
|
||||||
@ -47,7 +52,7 @@ if [[ $# -gt 0 ]]; then
|
|||||||
run_one "$name"
|
run_one "$name"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
for name in "${TARGETS[@]}"; do
|
while IFS= read -r name; do
|
||||||
run_one "$name"
|
run_one "$name"
|
||||||
done
|
done < <(discover_targets)
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user