Unverified Commit e9eaf130 by Evgeny Vereshchagin Committed by Christian Brauner

fuzz: generate all the config keys and add them to the seed corpus

It should help to cover more code faster Signed-off-by: 's avatarEvgeny Vereshchagin <evvers@ya.ru>
parent 5c7716a7
...@@ -43,4 +43,6 @@ make -j$(nproc) ...@@ -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 $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 $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 zip -r $OUT/fuzz-lxc-config-read_seed_corpus.zip doc/examples
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment