mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Updating fuzzing script with list of target.
Signed-off-by: Samuele Resca <samuele.resca@gmail.com>
This commit is contained in:
parent
b58f9c27e4
commit
37d62ba477
5
.github/workflows/fuzzing.yaml
vendored
5
.github/workflows/fuzzing.yaml
vendored
@ -5,10 +5,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
Target: [FuzzRangeRequest, FuzzPutRequest, FuzzDeleteRangeRequest]
|
||||
env:
|
||||
FUZZ_TARGET: ${{matrix.Target}}
|
||||
TARGET_PATH: ./server/etcdserver/api/v3rpc
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -19,4 +16,4 @@ jobs:
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
path: "${{env.TARGET_PATH}}/testdata/fuzz/${{env.FUZZ_TARGET}}/*"
|
||||
path: "${{env.TARGET_PATH}}/testdata/fuzz/**/*"
|
||||
|
@ -5,9 +5,14 @@ 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"}
|
||||
TARGETS="FuzzTxnRangeRequest FuzzTxnPutRequest FuzzTxnDeleteRangeRequest"
|
||||
|
||||
|
||||
for target in ${TARGETS}; do
|
||||
log_callout -e "\\nExecuting fuzzing with target ${target} in $target_path with a timeout of $fuzz_time\\n"
|
||||
run pushd ${target_path}
|
||||
$GO_CMD test -fuzz ${target} -fuzztime ${fuzz_time}
|
||||
run popd
|
||||
log_success -e "\\COMPLETED: fuzzing with target $target in $target_path \\n"
|
||||
done
|
||||
|
||||
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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user