Skip to content

Commit bbbcc02

Browse files
Generate random seed for fuzzer experiments.
1 parent 7338ac7 commit bbbcc02

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

experiment/sapling/run_all_tests.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ function run_fuzzer_config {
3232
exit 1
3333
fi
3434

35-
FUZZER_EXE="$fuzzer_exe" FUZZER_MODE=$mode FUZZER_TEST_COUNT=$test_count FUZZER_LAUNCHER="$launcher" sbatch --nodes 1 "experiment/$FUZZER_MACHINE/sbatch_fuzzer.sh"
35+
# Generate a random seed so we explore a novel part of the state space.
36+
seed="$(( 16#$(openssl rand -hex 4) * test_count ))"
37+
38+
FUZZER_EXE="$fuzzer_exe" FUZZER_MODE=$mode FUZZER_TEST_COUNT=$test_count FUZZER_SEED=$seed FUZZER_LAUNCHER="$launcher" sbatch --nodes 1 "experiment/$FUZZER_MACHINE/sbatch_fuzzer.sh"
3639
}
3740

3841
run_fuzzer_config debug_single single

experiment/sapling/sbatch_fuzzer.sh

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ fuzzer_flags=(
1818
-j${FUZZER_THREADS:-4}
1919
-n${FUZZER_TEST_COUNT:-1000}
2020
-o${FUZZER_OP_COUNT:-1000}
21+
-s${FUZZER_SEED:-0}
2122
--extra="$FUZZER_EXTRA_FLAGS"
2223
)
2324

0 commit comments

Comments
 (0)