From: Evgeny Vereshchagin Date: Fri, 26 Mar 2021 05:40:36 +0000 (+0000) Subject: fuzz: generate all the config keys and add them to the seed corpus X-Git-Tag: lxc-5.0.0~240^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98f9e64d332654a9c67bc6057edb3b6aee0c9cdb;p=thirdparty%2Flxc.git fuzz: generate all the config keys and add them to the seed corpus It should help to cover more code faster Signed-off-by: Evgeny Vereshchagin --- diff --git a/src/tests/oss-fuzz.sh b/src/tests/oss-fuzz.sh index 1a50049be..6f16a6fc1 100755 --- a/src/tests/oss-fuzz.sh +++ b/src/tests/oss-fuzz.sh @@ -43,4 +43,6 @@ make -j$(nproc) $CC -c -o fuzz-lxc-config-read.o $CFLAGS -Isrc -Isrc/lxc src/tests/fuzz-lxc-config-read.c $CXX $CXXFLAGS $LIB_FUZZING_ENGINE fuzz-lxc-config-read.o src/lxc/.libs/liblxc.a -o $OUT/fuzz-lxc-config-read +perl -lne 'if (/config_jump_table\[\]\s*=/../^}/) { /"([^"]+)"/ && print "$1=" }' src/lxc/confile.c >doc/examples/all-keys.conf +[[ -s doc/examples/all-keys.conf ]] zip -r $OUT/fuzz-lxc-config-read_seed_corpus.zip doc/examples