mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 08:48:55 +00:00
Add error checking to test_concurrent_writes (#2299)
This reveals a situation where s3fs triggers an unexpected EntityTooSmall error.
This commit is contained in:
parent
87b8bafaea
commit
95cfbe30ed
@ -1864,12 +1864,28 @@ function test_concurrent_reads {
|
||||
|
||||
function test_concurrent_writes {
|
||||
describe "Test concurrent writes to a file ..."
|
||||
|
||||
../../junk_data $((BIG_FILE_BLOCK_SIZE * BIG_FILE_COUNT)) > "${TEST_TEXT_FILE}"
|
||||
for _ in $(seq 10); do
|
||||
|
||||
NUM_PROCS=10
|
||||
PIDS=()
|
||||
for _ in $(seq "${NUM_PROCS}"); do
|
||||
dd if=/dev/zero of="${TEST_TEXT_FILE}" seek=$((RANDOM % BIG_FILE_LENGTH)) count=16 bs=1024 conv=notrunc &
|
||||
PIDS+=($!)
|
||||
done
|
||||
|
||||
GRC=0
|
||||
for PID in "${PIDS[@]}"; do
|
||||
wait "${PID}"
|
||||
RC=$?
|
||||
[ $RC -ne 0 ] && GRC="${RC}"
|
||||
done
|
||||
wait
|
||||
rm_test_file
|
||||
|
||||
if [ "${GRC}" -ne 0 ]; then
|
||||
echo "unexpected return code: $GRC"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function test_open_second_fd {
|
||||
|
Loading…
Reference in New Issue
Block a user