Skip to content

Commit 9366a73

Browse files
committed
Merge #19916: build: allow user to specify DIR_FUZZ_SEED_CORPUS for cov_fuzz
fb3bacc .gitignore: ignore qa-assets/ folder (eugene) a9f2014 build: use DIR_FUZZ_SEED_CORPUS if specified for cov_fuzz target (eugene) Pull request description: This PR contains two commits: - The cov_fuzz target now uses `DIR_FUZZ_SEED_CORPUS` as the seed directory instead of the hard-coded `qa-assets/fuzz_seed_corpus`. Otherwise, running it requires me to copy the corpus to the bitcoin directory first. In case `DIR_FUZZ_SEED_CORPUS` is not specified, the original default is used. - add qa-assets folder to gitignore Example usage: `make cov_fuzz DIR_FUZZ_SEED_CORPUS=~/workspace/qa-assets/fuzz_seed_corpus` It can also just be an environment variable. ACKs for top commit: fanquake: ACK fb3bacc - looks fine. practicalswift: ACK fb3bacc - patch looks correct Tree-SHA512: 19ad7c6a2b0c088df14fb71a217d956e66a69eea78f016cd1e914d39c5d7cc196766a637e6c941c6706322663010e7162e85f57e888b8f3b05d0c37d44740847
2 parents dffefda + fb3bacc commit 9366a73

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ total.coverage/
122122
fuzz.coverage/
123123
coverage_percent.txt
124124
/cov_tool_wrapper.sh
125+
qa-assets/
125126

126127
#build tests
127128
linux-coverage-build

Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ LCOV_FILTER_PATTERN = \
193193
-p "src/secp256k1" \
194194
-p "depends"
195195

196+
DIR_FUZZ_SEED_CORPUS ?= qa-assets/fuzz_seed_corpus
197+
196198
$(COV_TOOL_WRAPPER):
197199
@echo 'exec $(COV_TOOL) "$$@"' > $(COV_TOOL_WRAPPER)
198200
@chmod +x $(COV_TOOL_WRAPPER)
@@ -205,7 +207,7 @@ baseline_filtered.info: baseline.info
205207
$(LCOV) -a $@ $(LCOV_OPTS) -o $@
206208

207209
fuzz.info: baseline_filtered.info
208-
@TIMEOUT=15 test/fuzz/test_runner.py qa-assets/fuzz_seed_corpus -l DEBUG
210+
@TIMEOUT=15 test/fuzz/test_runner.py $(DIR_FUZZ_SEED_CORPUS) -l DEBUG
209211
$(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src --t fuzz-tests -o $@
210212
$(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src
211213

0 commit comments

Comments
 (0)