Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: fix issues reported by shellcheck #1474

Merged
merged 1 commit into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tests: fix issues reported by shellcheck
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed May 29, 2024
commit 163037a6ac37f1cab853761154217c494ae2917d
21 changes: 11 additions & 10 deletions tests/fuzzing/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ function run_test {
export FUZZING_MODE=$1
TEST_CASE=$2

result=$(honggfuzz --exit_upon_crash $VERBOSITY --run_time "$SINGLE_RUN_TIME" --timeout $TIMEOUT -T -i "$TEST_CASE" -- tests/tests_libcrun_fuzzer 2>&1 | tail -n 2)
# shellcheck disable=SC2086
result=$(honggfuzz --exit_upon_crash $VERBOSITY --run_time "$SINGLE_RUN_TIME" --timeout "$TIMEOUT" -T -i "$TEST_CASE" -- tests/tests_libcrun_fuzzer 2>&1 | tail -n 2)
echo "$result"
echo "$result" | grep -q crashes_count:0
}

run_test 0 $CORPUS/config-json
run_test 1 $CORPUS/config-json
run_test 2 $CORPUS/seccomp
run_test 3 $CORPUS/signals
run_test 4 $CORPUS/paths
run_test 0 "$CORPUS"/config-json
run_test 1 "$CORPUS"/config-json
run_test 2 "$CORPUS"/seccomp
run_test 3 "$CORPUS"/signals
run_test 4 "$CORPUS"/paths
run_test 5 random-data
run_test 6 $CORPUS/annotations
run_test 7 $CORPUS/idmapped-mounts-option
run_test 8 $CORPUS/intelrdt
run_test 9 $CORPUS/cpuset-ranges
run_test 6 "$CORPUS"/annotations
run_test 7 "$CORPUS"/idmapped-mounts-option
run_test 8 "$CORPUS"/intelrdt
run_test 9 "$CORPUS"/cpuset-ranges
Loading