Use more new file names for every test (#1902)

This makes the tests more robust.  Also fix filename to end in .txt.
This commit is contained in:
Andrew Gaul 2022-02-23 22:59:21 +09:00 committed by GitHub
parent 5452e9cb10
commit 0842c5718f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -248,8 +248,12 @@ function run_suite {
cd_run_dir "${key_prefix}" cd_run_dir "${key_prefix}"
for t in "${TEST_LIST[@]}"; do for t in "${TEST_LIST[@]}"; do
# Ensure test input name differs every iteration # Ensure test input name differs every iteration
TEST_TEXT_FILE="test-s3fs.txt-${RANDOM}" TEST_TEXT_FILE="test-s3fs-${RANDOM}.txt"
TEST_DIR="testdir-${RANDOM}" TEST_DIR="testdir-${RANDOM}"
# shellcheck disable=SC2034
ALT_TEST_TEXT_FILE="test-s3fs-ALT-${RANDOM}.txt"
# shellcheck disable=SC2034
BIG_FILE="big-file-s3fs-${RANDOM}.txt"
"${t}" "${key_prefix}" && rc=$? || rc=$? "${t}" "${key_prefix}" && rc=$? || rc=$?
if [ $rc = 0 ]; then if [ $rc = 0 ]; then
report_pass "${t}" report_pass "${t}"