]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
oss-fuzz: ensure binaries are zipped
authorChristian Brauner <brauner@kernel.org>
Thu, 9 Jun 2022 16:15:12 +0000 (18:15 +0200)
committerChristian Brauner (Microsoft) <christian.brauner@ubuntu.com>
Thu, 9 Jun 2022 21:07:08 +0000 (23:07 +0200)
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
src/tests/oss-fuzz.sh

index 7b465b3793cedb3605d4b299edaff642f0a52993..fb3701c829c44b7a721b566aa45ee071af737aaa 100755 (executable)
@@ -54,17 +54,17 @@ ninja -C san_build -v
 
 for fuzz_target_source in src/tests/fuzz-lxc*.c; do
     fuzz_target_name=$(basename "$fuzz_target_source" ".c")
-    cp "src/tests/$fuzz_target_name" "$OUT"
+    cp "san_build/src/tests/$fuzz_target_name" "$OUT"
 done
 
-perl -lne 'if (/config_jump_table\[\]\s*=/../^}/) { /"([^"]+)"/ && print "$1=" }' src/lxc/confile.c >doc/examples/keys.conf
-[[ -s doc/examples/keys.conf ]]
+perl -lne 'if (/config_jump_table\[\]\s*=/../^}/) { /"([^"]+)"/ && print "$1=" }' src/lxc/confile.c >san_build/doc/examples/keys.conf
+[[ -s san_build/doc/examples/keys.conf ]]
 
-perl -lne 'if (/config_jump_table_net\[\]\s*=/../^}/) { /"([^"]+)"/ && print "lxc.net.$1=" }' src/lxc/confile.c >doc/examples/lxc-net-keys.conf
-[[ -s doc/examples/lxc-net-keys.conf ]]
+perl -lne 'if (/config_jump_table_net\[\]\s*=/../^}/) { /"([^"]+)"/ && print "lxc.net.$1=" }' src/lxc/confile.c >san_build/doc/examples/lxc-net-keys.conf
+[[ -s san_build/doc/examples/lxc-net-keys.conf ]]
 
-zip -r $OUT/fuzz-lxc-config-read_seed_corpus.zip doc/examples
+zip -r $OUT/fuzz-lxc-config-read_seed_corpus.zip san_build/doc/examples
 
 mkdir fuzz-lxc-define-load_seed_corpus
-perl -lne '/([^=]+)/ && print "printf $1= >fuzz-lxc-define-load_seed_corpus/$1"' doc/examples/{keys,lxc-net-keys}.conf | bash
+perl -lne '/([^=]+)/ && print "printf $1= >fuzz-lxc-define-load_seed_corpus/$1"' san_build/doc/examples/{keys,lxc-net-keys}.conf | bash
 zip -r $OUT/fuzz-lxc-define-load_seed_corpus.zip fuzz-lxc-define-load_seed_corpus