For 'make check-verbose' run fuzzers with -verbose=1

This is the default for libFuzzer but not for the stub fuzzer lib.
This commit is contained in:
Todd C. Miller
2022-03-03 10:45:56 -07:00
parent ecaa8ab428
commit c131b27474
7 changed files with 26 additions and 22 deletions

View File

@@ -170,7 +170,7 @@ check: $(TEST_PROGS) check-fuzzer
fi fi
check-verbose: check-verbose:
exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v check exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v FUZZ_VERBOSE=-verbosity=1 check
clean: clean:
-$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f *.lo *.o *.la $(TEST_PROGS) -$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f *.lo *.o *.la $(TEST_PROGS)

View File

@@ -92,6 +92,7 @@ FUZZ_LIBS = $(LIB_FUZZING_ENGINE) @LIBS@
FUZZ_LDFLAGS = @LDFLAGS@ FUZZ_LDFLAGS = @LDFLAGS@
FUZZ_MAX_LEN = 4096 FUZZ_MAX_LEN = 4096
FUZZ_RUNS = 8192 FUZZ_RUNS = 8192
FUZZ_VERBOSE =
# Set to non-empty for development mode # Set to non-empty for development mode
DEVEL = @DEVEL@ DEVEL = @DEVEL@
@@ -216,7 +217,7 @@ run-fuzz_iolog_json: fuzz_iolog_json
for f in $(FUZZ_IOLOG_JSON_CORPUS); do \ for f in $(FUZZ_IOLOG_JSON_CORPUS); do \
cp $$f $$corpus; \ cp $$f $$corpus; \
done; \ done; \
./fuzz_iolog_json -dict=$(srcdir)/regress/fuzz/fuzz_iolog_json.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $$corpus ./fuzz_iolog_json -dict=$(srcdir)/regress/fuzz/fuzz_iolog_json.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $(FUZZ_VERBOSE) $$corpus
fuzz_iolog_legacy_seed_corpus.zip: fuzz_iolog_legacy_seed_corpus.zip:
tdir=fuzz_iolog_legacy.$$$$; \ tdir=fuzz_iolog_legacy.$$$$; \
@@ -242,7 +243,7 @@ run-fuzz_iolog_legacy: fuzz_iolog_legacy
for f in $(FUZZ_IOLOG_LEGACY_CORPUS); do \ for f in $(FUZZ_IOLOG_LEGACY_CORPUS); do \
cp $$f $$corpus; \ cp $$f $$corpus; \
done; \ done; \
./fuzz_iolog_legacy -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $$corpus ./fuzz_iolog_legacy -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $(FUZZ_VERBOSE) $$corpus
fuzz_iolog_timing_seed_corpus.zip: fuzz_iolog_timing_seed_corpus.zip:
tdir=fuzz_iolog_timing.$$$$; \ tdir=fuzz_iolog_timing.$$$$; \
@@ -268,7 +269,7 @@ run-fuzz_iolog_timing: fuzz_iolog_timing
for f in $(FUZZ_IOLOG_TIMING_CORPUS); do \ for f in $(FUZZ_IOLOG_TIMING_CORPUS); do \
cp $$f $$corpus; \ cp $$f $$corpus; \
done; \ done; \
./fuzz_iolog_timing -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $$corpus ./fuzz_iolog_timing -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $(FUZZ_VERBOSE) $$corpus
pre-install: pre-install:
@@ -313,11 +314,11 @@ check-fuzzer: $(FUZZ_PROGS)
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
MALLOC_CONF="abort:true,junk:true"; export MALLOC_CONF; \ MALLOC_CONF="abort:true,junk:true"; export MALLOC_CONF; \
echo "fuzz_iolog_legacy: verifying corpus"; \ echo "fuzz_iolog_legacy: verifying corpus"; \
./fuzz_iolog_legacy $(FUZZ_IOLOG_LEGACY_CORPUS); \ ./fuzz_iolog_legacy $(FUZZ_VERBOSE) $(FUZZ_IOLOG_LEGACY_CORPUS); \
echo "fuzz_iolog_json: verifying corpus"; \ echo "fuzz_iolog_json: verifying corpus"; \
./fuzz_iolog_json $(FUZZ_IOLOG_JSON_CORPUS); \ ./fuzz_iolog_json $(FUZZ_VERBOSE) $(FUZZ_IOLOG_JSON_CORPUS); \
echo "fuzz_iolog_timing: verifying corpus"; \ echo "fuzz_iolog_timing: verifying corpus"; \
./fuzz_iolog_timing $(FUZZ_IOLOG_TIMING_CORPUS); \ ./fuzz_iolog_timing $(FUZZ_VERBOSE) $(FUZZ_IOLOG_TIMING_CORPUS); \
fi fi
check: $(TEST_PROGS) check-fuzzer check: $(TEST_PROGS) check-fuzzer
@@ -341,7 +342,7 @@ check: $(TEST_PROGS) check-fuzzer
fi fi
check-verbose: check-verbose:
exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v check exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v FUZZ_VERBOSE=-verbosity=1 check
clean: clean:
-$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f $(TEST_PROGS) $(FUZZ_PROGS) \ -$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f $(TEST_PROGS) $(FUZZ_PROGS) \

View File

@@ -128,6 +128,7 @@ FUZZ_LIBS = $(LIB_FUZZING_ENGINE) @LIBS@
FUZZ_LDFLAGS = @LDFLAGS@ FUZZ_LDFLAGS = @LDFLAGS@
FUZZ_MAX_LEN = 4096 FUZZ_MAX_LEN = 4096
FUZZ_RUNS = 8192 FUZZ_RUNS = 8192
FUZZ_VERBOSE =
# User and group ids the installed files should be "owned" by # User and group ids the installed files should be "owned" by
install_uid = 0 install_uid = 0
@@ -349,7 +350,7 @@ run-fuzz_sudo_conf: fuzz_sudo_conf
for f in $(FUZZ_SUDO_CONF_CORPUS); do \ for f in $(FUZZ_SUDO_CONF_CORPUS); do \
cp $$f $$corpus; \ cp $$f $$corpus; \
done; \ done; \
./fuzz_sudo_conf -dict=$(srcdir)/regress/fuzz/fuzz_sudo_conf.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $$corpus ./fuzz_sudo_conf -dict=$(srcdir)/regress/fuzz/fuzz_sudo_conf.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $(FUZZ_VERBOSE) $$corpus
pre-install: pre-install:
@@ -406,7 +407,7 @@ check-fuzzer: $(FUZZ_PROGS)
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
MALLOC_CONF="abort:true,junk:true"; export MALLOC_CONF; \ MALLOC_CONF="abort:true,junk:true"; export MALLOC_CONF; \
echo "fuzz_sudo_conf: verifying corpus"; \ echo "fuzz_sudo_conf: verifying corpus"; \
./fuzz_sudo_conf $(FUZZ_SUDO_CONF_CORPUS); \ ./fuzz_sudo_conf $(FUZZ_VERBOSE) $(FUZZ_SUDO_CONF_CORPUS); \
fi fi
# Note: some regress checks are run from srcdir for consistent error messages # Note: some regress checks are run from srcdir for consistent error messages
@@ -468,7 +469,7 @@ check: $(TEST_PROGS) check-fuzzer
fi fi
check-verbose: check-verbose:
exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v check exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v FUZZ_VERBOSE=-verbosity=1 check
clean: clean:
-$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f $(TEST_PROGS) $(FUZZ_PROGS) \ -$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f $(TEST_PROGS) $(FUZZ_PROGS) \

View File

@@ -109,6 +109,7 @@ FUZZ_LIBS = $(LIB_FUZZING_ENGINE) $(LIBS)
FUZZ_LDFLAGS = $(LDFLAGS) FUZZ_LDFLAGS = $(LDFLAGS)
FUZZ_MAX_LEN = 4096 FUZZ_MAX_LEN = 4096
FUZZ_RUNS = 8192 FUZZ_RUNS = 8192
FUZZ_VERBOSE =
# User and group IDs the installed files should be "owned" by # User and group IDs the installed files should be "owned" by
install_uid = 0 install_uid = 0
@@ -195,7 +196,7 @@ run-fuzz_logsrvd_conf: fuzz_logsrvd_conf
for f in $(FUZZ_LOGSRVD_CONF_CORPUS); do \ for f in $(FUZZ_LOGSRVD_CONF_CORPUS); do \
cp $$f $$corpus; \ cp $$f $$corpus; \
done; \ done; \
./fuzz_logsrvd_conf -dict=$(srcdir)/regress/fuzz/fuzz_logsrvd_conf.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $$corpus ./fuzz_logsrvd_conf -dict=$(srcdir)/regress/fuzz/fuzz_logsrvd_conf.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $(FUZZ_VERBOSE) $$corpus
pre-install: pre-install:
@@ -252,7 +253,7 @@ check-fuzzer: $(FUZZ_PROGS)
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
MALLOC_CONF="abort:true,junk:true"; export MALLOC_CONF; \ MALLOC_CONF="abort:true,junk:true"; export MALLOC_CONF; \
echo "fuzz_logsrvd_conf: verifying corpus"; \ echo "fuzz_logsrvd_conf: verifying corpus"; \
./fuzz_logsrvd_conf $(FUZZ_LOGSRVD_CONF_CORPUS); \ ./fuzz_logsrvd_conf $(FUZZ_VERBOSE) $(FUZZ_LOGSRVD_CONF_CORPUS); \
fi fi
check: check-fuzzer check: check-fuzzer

View File

@@ -240,7 +240,7 @@ check: $(TEST_PROGS) check-fuzzer
fi fi
check-verbose: check-verbose:
exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v check exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v FUZZ_VERBOSE=-verbosity=1 check
update_test_data: $(TEST_PROGS) update_test_data: $(TEST_PROGS)
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \

View File

@@ -171,6 +171,7 @@ FUZZ_LIBS = libparsesudoers.la @SUDOERS_LIBS@ $(LIB_FUZZING_ENGINE)
FUZZ_LDFLAGS = @SUDOERS_LDFLAGS@ FUZZ_LDFLAGS = @SUDOERS_LDFLAGS@
FUZZ_MAX_LEN = 4096 FUZZ_MAX_LEN = 4096
FUZZ_RUNS = 8192 FUZZ_RUNS = 8192
FUZZ_VERBOSE =
AUTH_OBJS = sudo_auth.lo @AUTH_OBJS@ AUTH_OBJS = sudo_auth.lo @AUTH_OBJS@
@@ -442,7 +443,7 @@ run-fuzz_policy: fuzz_policy
for f in $(FUZZ_POLICY_CORPUS); do \ for f in $(FUZZ_POLICY_CORPUS); do \
cp $$f $$corpus; \ cp $$f $$corpus; \
done; \ done; \
./fuzz_policy -dict=$(srcdir)/regress/fuzz/fuzz_policy.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $$corpus ./fuzz_policy -dict=$(srcdir)/regress/fuzz/fuzz_policy.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $(FUZZ_VERBOSE) $$corpus
fuzz_sudoers_seed_corpus.zip: fuzz_sudoers_seed_corpus.zip:
tdir=fuzz_sudoers.$$$$; \ tdir=fuzz_sudoers.$$$$; \
@@ -468,7 +469,7 @@ run-fuzz_sudoers: fuzz_sudoers
for f in $(FUZZ_SUDOERS_CORPUS); do \ for f in $(FUZZ_SUDOERS_CORPUS); do \
cp $$f $$corpus; \ cp $$f $$corpus; \
done; \ done; \
./fuzz_sudoers -dict=$(srcdir)/regress/fuzz/fuzz_sudoers.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $$corpus ./fuzz_sudoers -dict=$(srcdir)/regress/fuzz/fuzz_sudoers.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $(FUZZ_VERBOSE) $$corpus
fuzz_sudoers_ldif_seed_corpus.zip: fuzz_sudoers_ldif_seed_corpus.zip:
tdir=fuzz_sudoers_ldif.$$$$; \ tdir=fuzz_sudoers_ldif.$$$$; \
@@ -494,7 +495,7 @@ run-fuzz_sudoers_ldif: fuzz_sudoers_ldif
for f in $(FUZZ_SUDOERS_LDIF_CORPUS); do \ for f in $(FUZZ_SUDOERS_LDIF_CORPUS); do \
cp $$f $$corpus; \ cp $$f $$corpus; \
done; \ done; \
./fuzz_sudoers_ldif -dict=$(srcdir)/regress/fuzz/fuzz_sudoers_ldif.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $$corpus ./fuzz_sudoers_ldif -dict=$(srcdir)/regress/fuzz/fuzz_sudoers_ldif.dict -max_len=$(FUZZ_MAX_LEN) -runs=$(FUZZ_RUNS) $(FUZZ_VERBOSE) $$corpus
GENERATED = gram.h gram.c toke.c def_data.c def_data.h getdate.c GENERATED = gram.h gram.c toke.c def_data.c def_data.h getdate.c
@@ -638,11 +639,11 @@ check-fuzzer: $(FUZZ_PROGS)
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
MALLOC_CONF="abort:true,junk:true"; export MALLOC_CONF; \ MALLOC_CONF="abort:true,junk:true"; export MALLOC_CONF; \
echo "fuzz_sudoers: verifying corpus"; \ echo "fuzz_sudoers: verifying corpus"; \
./fuzz_sudoers $(FUZZ_SUDOERS_CORPUS); \ ./fuzz_sudoers $(FUZZ_VERBOSE) $(FUZZ_SUDOERS_CORPUS); \
echo "fuzz_sudoers-ldif: verifying corpus"; \ echo "fuzz_sudoers-ldif: verifying corpus"; \
./fuzz_sudoers_ldif $(FUZZ_SUDOERS_LDIF_CORPUS); \ ./fuzz_sudoers_ldif $(FUZZ_VERBOSE) $(FUZZ_SUDOERS_LDIF_CORPUS); \
echo "fuzz_policy: verifying corpus"; \ echo "fuzz_policy: verifying corpus"; \
./fuzz_policy $(FUZZ_POLICY_CORPUS); \ ./fuzz_policy $(FUZZ_VERBOSE) $(FUZZ_POLICY_CORPUS); \
fi fi
check: $(TEST_PROGS) visudo testsudoers cvtsudoers check-fuzzer check: $(TEST_PROGS) visudo testsudoers cvtsudoers check-fuzzer
@@ -686,7 +687,7 @@ check: $(TEST_PROGS) visudo testsudoers cvtsudoers check-fuzzer
fi fi
check-verbose: check-verbose:
exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v check exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v FUZZ_VERBOSE=-verbosity=1 check
clean: clean:
-$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f $(PROGS) $(TEST_PROGS) \ -$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f $(PROGS) $(TEST_PROGS) \

View File

@@ -341,7 +341,7 @@ check: $(TEST_PROGS) check-fuzzer
fi fi
check-verbose: check-verbose:
exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v check exec $(MAKE) $(MFLAGS) TEST_VERBOSE=-v FUZZ_VERBOSE=-verbosity=1 check
clean: clean:
-$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f $(PROGS) $(TEST_PROGS) \ -$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f $(PROGS) $(TEST_PROGS) \