mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 08:48:55 +00:00
Add a test for concurrent writes
This commit is contained in:
parent
c7f8f61d09
commit
5cb7a31c09
@ -545,6 +545,16 @@ function test_concurrency {
|
||||
rm -f `seq 5`
|
||||
}
|
||||
|
||||
function test_concurrent_writes {
|
||||
describe "Test concurrent updates to a file"
|
||||
dd if=/dev/urandom of=${TEST_TEXT_FILE} bs=$BIG_FILE_LENGTH count=1
|
||||
for process in `seq 10`; do
|
||||
dd if=/dev/zero of=${TEST_TEXT_FILE} seek=$(($RANDOM % $BIG_FILE_LENGTH)) count=1 bs=1024 conv=notrunc &
|
||||
done
|
||||
wait
|
||||
rm_test_file
|
||||
}
|
||||
|
||||
function test_open_second_fd {
|
||||
describe "read from an open fd"
|
||||
rm -f ${TEST_TEXT_FILE}
|
||||
@ -581,6 +591,7 @@ function add_all_tests {
|
||||
add_tests test_write_after_seek_ahead
|
||||
add_tests test_overwrite_existing_file_range
|
||||
add_tests test_concurrency
|
||||
add_tests test_concurrent_writes
|
||||
add_tests test_open_second_fd
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user