aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-11-19 00:11:26 +0000
committerJesse Luehrs <doy@tozt.net>2021-11-19 00:11:26 +0000
commit86099e63ddd0fbc03800f1f8edaec91432e990b7 (patch)
tree54f31d1dcaf376b5145bff1c77bcc784bd8c5841
parent16261f8e02b36a6518ed5c418daf9be6d7abb37e (diff)
downloadvt100-rust-86099e63ddd0fbc03800f1f8edaec91432e990b7.tar.gz
vt100-rust-86099e63ddd0fbc03800f1f8edaec91432e990b7.zip
parallelize fuzzing
-rwxr-xr-xbin/fuzz8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/fuzz b/bin/fuzz
index 81f45ce..397a550 100755
--- a/bin/fuzz
+++ b/bin/fuzz
@@ -1,7 +1,13 @@
#!/bin/sh
set -eu
+ncpu="$(cat /proc/cpuinfo | grep '^processor' | wc -l)"
+
cd fuzz
cargo afl build --release
mkdir -p out
-cargo afl fuzz -i in -o out -t 10000 target/release/fuzz
+
+tmux new-window cargo afl fuzz -i in -o out -t 10000 -M main_fuzzer target/release/fuzz
+for i in $(seq 2 "$ncpu"); do
+ tmux new-window cargo afl fuzz -i in -o out -t 10000 -S "secondary_fuzzer_$i" target/release/fuzz
+done