Skip to content

Commit 5223372

Browse files
Ming Leiaxboe
authored andcommitted
selftests: ublk: don't take same backing file for more than one ublk devices
Don't use same backing file for more than one ublk devices, and avoid concurrent write on same file from more ublk disks. Fixes: 8ccebc1 ("selftests: ublk: support UBLK_F_AUTO_BUF_REG") Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 524346e commit 5223372

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/testing/selftests/ublk/test_stress_03.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,23 @@ _create_backfile 2 128M
3232
ublk_io_and_remove 8G -t null -q 4 -z &
3333
ublk_io_and_remove 256M -t loop -q 4 -z "${UBLK_BACKFILES[0]}" &
3434
ublk_io_and_remove 256M -t stripe -q 4 -z "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
35+
wait
3536

3637
if _have_feature "AUTO_BUF_REG"; then
3738
ublk_io_and_remove 8G -t null -q 4 --auto_zc &
3839
ublk_io_and_remove 256M -t loop -q 4 --auto_zc "${UBLK_BACKFILES[0]}" &
3940
ublk_io_and_remove 256M -t stripe -q 4 --auto_zc "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
4041
ublk_io_and_remove 8G -t null -q 4 -z --auto_zc --auto_zc_fallback &
42+
wait
4143
fi
42-
wait
4344

4445
if _have_feature "PER_IO_DAEMON"; then
4546
ublk_io_and_remove 8G -t null -q 4 --auto_zc --nthreads 8 --per_io_tasks &
4647
ublk_io_and_remove 256M -t loop -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[0]}" &
4748
ublk_io_and_remove 256M -t stripe -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
4849
ublk_io_and_remove 8G -t null -q 4 -z --auto_zc --auto_zc_fallback --nthreads 8 --per_io_tasks &
50+
wait
4951
fi
50-
wait
5152

5253
_cleanup_test "stress"
5354
_show_result $TID $ERR_CODE

0 commit comments

Comments
 (0)