diff options
Diffstat (limited to 'fuzz/Makefile')
-rw-r--r-- | fuzz/Makefile | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fuzz/Makefile b/fuzz/Makefile index c8fe0b8..77699ac 100644 --- a/fuzz/Makefile +++ b/fuzz/Makefile | |||
@@ -2,10 +2,10 @@ | |||
2 | # Use of this source code is governed by a BSD-style | 2 | # Use of this source code is governed by a BSD-style |
3 | # license that can be found in the LICENSE file. | 3 | # license that can be found in the LICENSE file. |
4 | 4 | ||
5 | IMAGE := libfido2-coverage:1.3.0 | 5 | IMAGE := libfido2-coverage:1.5.0 |
6 | RUNNER := libfido2-runner | 6 | RUNNER := libfido2-runner |
7 | PROFDATA := llvm-profdata-9 | 7 | PROFDATA := llvm-profdata-10 |
8 | COV := llvm-cov-9 | 8 | COV := llvm-cov-10 |
9 | TARGETS := fuzz_assert fuzz_bio fuzz_cred fuzz_credman fuzz_mgmt | 9 | TARGETS := fuzz_assert fuzz_bio fuzz_cred fuzz_credman fuzz_mgmt |
10 | CORPORA := $(foreach f,${TARGETS},${f}/corpus) | 10 | CORPORA := $(foreach f,${TARGETS},${f}/corpus) |
11 | MINIFY := $(foreach f,${TARGETS},/minify/${f}/corpus) | 11 | MINIFY := $(foreach f,${TARGETS},/minify/${f}/corpus) |
@@ -26,16 +26,16 @@ sync: run | |||
26 | docker exec ${RUNNER} make -C libfido2/build | 26 | docker exec ${RUNNER} make -C libfido2/build |
27 | 27 | ||
28 | corpus: sync | 28 | corpus: sync |
29 | docker exec ${RUNNER} /bin/bash -c 'cd /libfido2/fuzz && rm -rf ${TARGETS}' | 29 | docker exec ${RUNNER} /bin/sh -c 'cd /libfido2/fuzz && rm -rf ${TARGETS}' |
30 | docker exec ${RUNNER} tar Czxf /libfido2/fuzz /libfido2/fuzz/corpus.tgz | 30 | docker exec ${RUNNER} tar Czxf /libfido2/fuzz /libfido2/fuzz/corpus.tgz |
31 | 31 | ||
32 | ${TARGETS}: corpus sync | 32 | ${TARGETS}: corpus sync |
33 | docker exec -e LLVM_PROFILE_FILE=/profraw/$@ ${RUNNER} \ | 33 | docker exec -e LLVM_PROFILE_FILE=/profraw/$@ ${RUNNER} \ |
34 | /bin/bash -c 'rm -f /profraw/$@ && /libfido2/build/fuzz/$@ \ | 34 | /bin/sh -c 'rm -f /profraw/$@ && /libfido2/build/fuzz/$@ \ |
35 | -runs=1 /libfido2/fuzz/$@' | 35 | -runs=1 /libfido2/fuzz/$@' |
36 | 36 | ||
37 | ${MINIFY}: /minify/%/corpus: % | 37 | ${MINIFY}: /minify/%/corpus: % |
38 | docker exec ${RUNNER} /bin/bash -c 'rm -rf $@ && mkdir -p $@ && \ | 38 | docker exec ${RUNNER} /bin/sh -c 'rm -rf $@ && mkdir -p $@ && \ |
39 | /libfido2/build/fuzz/$< -use_value_profile=1 -merge=1 $@ \ | 39 | /libfido2/build/fuzz/$< -use_value_profile=1 -merge=1 $@ \ |
40 | /libfido2/fuzz/$</corpus' | 40 | /libfido2/fuzz/$</corpus' |
41 | 41 | ||
@@ -43,11 +43,11 @@ corpus.tgz-: ${MINIFY} | |||
43 | docker exec -i ${RUNNER} tar Czcf /minify - ${TARGETS} > $@ | 43 | docker exec -i ${RUNNER} tar Czcf /minify - ${TARGETS} > $@ |
44 | 44 | ||
45 | profdata: run | 45 | profdata: run |
46 | docker exec ${RUNNER} /bin/bash -c 'rm -f /$@ && ${PROFDATA} \ | 46 | docker exec ${RUNNER} /bin/sh -c 'rm -f /$@ && ${PROFDATA} \ |
47 | merge -sparse profraw/* -o $@' | 47 | merge -sparse profraw/* -o $@' |
48 | 48 | ||
49 | report.tgz: profdata | 49 | report.tgz: profdata |
50 | docker exec ${RUNNER} /bin/bash -c 'rm -rf /report && mkdir /report && \ | 50 | docker exec ${RUNNER} /bin/sh -c 'rm -rf /report && mkdir /report && \ |
51 | ${COV} show -format=html -tab-size=8 -instr-profile=/$< \ | 51 | ${COV} show -format=html -tab-size=8 -instr-profile=/$< \ |
52 | -output-dir=/report /libfido2/build/src/libfido2.so' | 52 | -output-dir=/report /libfido2/build/src/libfido2.so' |
53 | docker exec -i ${RUNNER} tar Czcf / - report > $@ | 53 | docker exec -i ${RUNNER} tar Czcf / - report > $@ |
@@ -57,12 +57,12 @@ summary.txt: profdata | |||
57 | /libfido2/build/src/libfido2.so -instr-profile=/$< > $@ | 57 | /libfido2/build/src/libfido2.so -instr-profile=/$< > $@ |
58 | 58 | ||
59 | functions.txt: profdata | 59 | functions.txt: profdata |
60 | docker exec ${RUNNER} /bin/bash -c '${COV} report -use-color=false \ | 60 | docker exec ${RUNNER} /bin/sh -c '${COV} report -use-color=false \ |
61 | -show-functions -instr-profile=/$< \ | 61 | -show-functions -instr-profile=/$< \ |
62 | /libfido2/build/src/libfido2.so /libfido2/src/*.[ch]' > $@ | 62 | /libfido2/build/src/libfido2.so /libfido2/src/*.[ch]' > $@ |
63 | 63 | ||
64 | clean: run | 64 | clean: run |
65 | docker exec ${RUNNER} /bin/bash -c 'rm -rf /profraw /profdata && \ | 65 | docker exec ${RUNNER} /bin/sh -c 'rm -rf /profraw /profdata && \ |
66 | make -C /libfido2/build clean' | 66 | make -C /libfido2/build clean' |
67 | -docker stop ${RUNNER} | 67 | -docker stop ${RUNNER} |
68 | rm -rf ${TARGETS} | 68 | rm -rf ${TARGETS} |