Skip to content

Commit d829540

Browse files
calebsanderaxboe
authored andcommitted
selftests: ublk: don't share backing files between ublk servers
stress_04 is missing a wait between blocks of tests, meaning multiple ublk servers will be running in parallel using the same backing files. Add a wait after each section to ensure each backing file is in use by a single ublk server at a time. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 20da98a commit d829540

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tools/testing/selftests/ublk/test_stress_04.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,23 @@ _create_backfile 2 128M
3131
ublk_io_and_kill_daemon 8G -t null -q 4 -z --no_ublk_fixed_fd &
3232
ublk_io_and_kill_daemon 256M -t loop -q 4 -z --no_ublk_fixed_fd "${UBLK_BACKFILES[0]}" &
3333
ublk_io_and_kill_daemon 256M -t stripe -q 4 -z "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
34+
wait
3435

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

4244
if _have_feature "PER_IO_DAEMON"; then
4345
ublk_io_and_kill_daemon 8G -t null -q 4 --auto_zc --nthreads 8 --per_io_tasks &
4446
ublk_io_and_kill_daemon 256M -t loop -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[0]}" &
4547
ublk_io_and_kill_daemon 256M -t stripe -q 4 --auto_zc --nthreads 8 --per_io_tasks "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
4648
ublk_io_and_kill_daemon 8G -t null -q 4 -z --auto_zc --auto_zc_fallback --nthreads 8 --per_io_tasks &
49+
wait
4750
fi
48-
wait
4951

5052
_cleanup_test "stress"
5153
_show_result $TID $ERR_CODE

0 commit comments

Comments
 (0)