From 51f8583447a97fbd913ef961bf85a22a925395cc Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 19 Oct 2026 21:35:22 +0200 Subject: vnf: add fuzzy testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This takes advantage of the fact that fuzzy testing happens after building all the ROM files. With that, we can use these files so libfuzzer can take them as the corpus. Signed-off-by: Miquel Sabaté Solà --- scripts/fuzz.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts') diff --git a/scripts/fuzz.sh b/scripts/fuzz.sh index d2fd00a..fb13e49 100755 --- a/scripts/fuzz.sh +++ b/scripts/fuzz.sh @@ -10,3 +10,12 @@ popd pushd lib/header cargo +nightly fuzz run fuzz-target-header -- -max_total_time=180 popd + +# For vnf, we want to give it some ROM files as a corpus so it does a better job +# at fuzzing, otherwise vnf would just return a super early normal error and +# quit. +mkdir -p lib/vnf/fuzz/corpus/fuzz-target-vnf +cp tests/out/*.nes lib/vnf/fuzz/corpus/fuzz-target-vnf/ +pushd lib/vnf +cargo +nightly fuzz run fuzz-target-vnf -- -max_total_time=180 +popd -- cgit v1.2.3