From 3c5292b270346d6083e90522f166fda67b69c674 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sun, 8 Dec 2024 16:22:29 +0100 Subject: [PATCH 1/2] build: don't compile tests during normal build Signed-off-by: Jan Palus --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 7c1fbfe614..8cb40e68a0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -168,7 +168,7 @@ else noinst_PROGRAMS = crun endif -noinst_PROGRAMS += tests/init $(UNIT_TESTS) tests/tests_libcrun_fuzzer +check_PROGRAMS = tests/init $(UNIT_TESTS) tests/tests_libcrun_fuzzer TESTS_LDADD = libcrun_testing.a $(FOUND_LIBS) $(maybe_libyajl.la) From 9e3615a485fae8948dcd1033ae2e66f251e93054 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sun, 8 Dec 2024 19:10:42 +0100 Subject: [PATCH 2/2] ci: build tests_libcrun_fuzzer before fuzzing Signed-off-by: Jan Palus --- tests/fuzzing/run-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/fuzzing/run-tests.sh b/tests/fuzzing/run-tests.sh index ac7e9398df..bd4859c030 100755 --- a/tests/fuzzing/run-tests.sh +++ b/tests/fuzzing/run-tests.sh @@ -17,6 +17,7 @@ git clean -fdx ./autogen.sh ./configure --enable-embedded-yajl HFUZZ_CC_UBSAN=1 HFUZZ_CC_ASAN=1 CC=hfuzz-clang CPPFLAGS="-D FUZZER" CFLAGS="-ggdb3 -fsanitize-coverage=trace-pc-guard,trace-cmp,trace-div,indirect-calls" make -j "$(nproc)" +make -j "$(nproc)" tests/tests_libcrun_fuzzer mkdir rootfs mkdir random-data