Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Make.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export OPTIMIZATIONS
ifneq ($(CCACHE_DISABLE),)
export CCACHE_DISABLE
endif
MAX_FUZZ_TIME ?= 60

SUBDIRS = $(TOPDIR)/Cryptlib $(TOPDIR)/lib

Expand Down
22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -469,24 +469,32 @@ else
$(PESIGN) -n certdb -i $< -c "shim" -s -o $@ -f
endif

fuzz fuzz-clean fuzz-coverage fuzz-lto :
fuzz:
@make -f $(TOPDIR)/include/fuzz.mk \
COMPILER="$(COMPILER)" \
CROSS_COMPILE="$(CROSS_COMPILE)" \
CLANG_WARNINGS="$(CLANG_WARNINGS)" \
ARCH_DEFINES="$(ARCH_DEFINES)" \
EFI_INCLUDES="$(EFI_INCLUDES)" \
fuzz-clean $@
MAX_FUZZ_TIME=$(MAX_FUZZ_TIME) \
$@

test test-clean test-coverage test-lto : | clean-test-results
test test-clean test-coverage test-lto : generated_sbat_var_defs.h
test test-coverage test-lto : | clean-test-results
test test-coverage test-lto : generated_sbat_var_defs.h
@make -f $(TOPDIR)/include/test.mk \
COMPILER="$(COMPILER)" \
CROSS_COMPILE="$(CROSS_COMPILE)" \
CLANG_WARNINGS="$(CLANG_WARNINGS)" \
ARCH_DEFINES="$(ARCH_DEFINES)" \
EFI_INCLUDES="$(EFI_INCLUDES)" \
test-clean $@
$@
Comment thread
vathpela marked this conversation as resolved.

fuzz-clean:
@rm -vf random.bin libefi-test.a $(wildcard *-corpus/fuzz*.log)

test-clean:
@rm -vf test-random.h libefi-test.a
@rm -vf vgcore.*

$(patsubst %.c,%,$(wildcard fuzz-*.c)) :
@make -f $(TOPDIR)/include/fuzz.mk EFI_INCLUDES="$(EFI_INCLUDES)" ARCH_DEFINES="$(ARCH_DEFINES)" $@
Expand All @@ -496,10 +504,10 @@ $(patsubst %.c,%,$(wildcard test-*.c)) :
@make -f $(TOPDIR)/include/test.mk EFI_INCLUDES="$(EFI_INCLUDES)" ARCH_DEFINES="$(ARCH_DEFINES)" $@

clean-fuzz-objs:
@make -f $(TOPDIR)/include/fuzz.mk EFI_INCLUDES="$(EFI_INCLUDES)" ARCH_DEFINES="$(ARCH_DEFINES)" clean
@find . -type f -a -perm /111 -a -iname 'fuzz-*' -print -delete

clean-test-objs:
@make -f $(TOPDIR)/include/test.mk EFI_INCLUDES="$(EFI_INCLUDES)" ARCH_DEFINES="$(ARCH_DEFINES)" clean
@find . -type f -a -perm /111 -a -iname 'test-*' -print -delete

.PHONY : $(patsubst %.c,%,$(wildcard fuzz-*.c)) fuzz
.PHONY : $(patsubst %.c,%,$(wildcard test-*.c)) test
Expand Down
3 changes: 1 addition & 2 deletions include/fuzz.mk
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ fuzz : $(fuzzers)
$(MAKE) -f include/fuzz.mk fuzz-clean

fuzz-clean :
@rm -vf random.bin libefi-test.a
@rm -vf vgcore.* fuzz*.log
@rm -vf random.bin libefi-test.a $(wildcard *-corpus/fuzz*.log)

clean : fuzz-clean

Expand Down
Loading