Adding fuzz test on v3rpc interfaces.

Signed-off-by: Samuele Resca <sr7@ad.datcon.co.uk>
Signed-off-by: Samuele Resca <samuele.resca@gmail.com>
This commit is contained in:
Samuele Resca
2022-10-13 22:17:16 +01:00
committed by Samuele Resca
parent e5790d204c
commit 3d9c5c6166
4 changed files with 258 additions and 0 deletions

13
scripts/fuzzing.sh Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -e
source ./scripts/test_lib.sh
GO_CMD="go"
fuzz_time=${FUZZ_TIME:-"300s"}
target_path=${TARGET_PATH:-"./server/etcdserver/api/v3rpc"}
fuzz_target=${FUZZ_TARGET:-"FuzzRangeRequest"}
log_callout -e "\\nExecuting fuzzing with target ${fuzz_target} in $target_path with a timeout of $fuzz_time\\n"
cd "$target_path"
$GO_CMD test -fuzz "$fuzz_target" -fuzztime "$fuzz_time"
log_success -e "\\COMPLETED: fuzzing with target $fuzz_target in $target_path \\n"