File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
01-access-modeling-for-fuzzing/p2im-unittests Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ DIR="$(dirname "$(readlink -f "$0")")"
3
3
4
4
NUM_INSTANCES=1
5
5
6
+ set -e
6
7
fuzzware checkenv -n $NUM_INSTANCES || { echo " Error during initial sanity checks. Please fix according to debug output." ; exit 1; }
7
8
8
9
" $DIR " /run_fuzzers.sh $NUM_INSTANCES || { echo " [ERROR] run_fuzzers failed" ; exit 1; }
Original file line number Diff line number Diff line change @@ -20,11 +20,19 @@ if [ $num_available_cores -gt 1 ] && [ $num_procs -gt $(( $num_available_cores /
20
20
exit 1;
21
21
fi
22
22
23
+ if [ $(( 4 * $num_procs )) -gt $( cat /proc/sys/fs/inotify/max_user_instances) ]; then
24
+ echo " [ERROR] inotify limits too low for requested number of fuzzing instances (did you set limits?)"
25
+ exit 1
26
+ fi
27
+
23
28
FUZZING_RUNTIME=" 00:15:00"
24
29
25
30
export AFL_SKIP_CPUFREQ=1
26
- ( for f in ` find $DIR -iname ' *.elf' ` ; do echo $( dirname $f ) ; done ) | xargs -I{} --max-procs $num_procs -- \
27
- fuzzware pipeline --run-for=$FUZZING_RUNTIME {};
31
+ ( for f in ` find $DIR -iname ' *.elf' ` ; do
32
+ # Skip possible copies within already-existing project directories
33
+ if [ " $( basename $( dirname $f ) ) " != " data" ]; then
34
+ echo " fuzzware pipeline --run-for=$FUZZING_RUNTIME $( dirname $f ) " ;
35
+ fi
36
+ done ) | xargs -I{} --max-procs $num_procs -- bash -c " {}"
28
37
29
- ( for p in ` find $DIR -name fuzzware-project` ; do echo $p ; done ) | xargs -I{} --max-procs $(( $num_procs * 2 )) -- \
30
- fuzzware gentraces -p {} --main-dirs all bb
38
+ exit 0
You can’t perform that action at this time.
0 commit comments