File tree Expand file tree Collapse file tree 3 files changed +77
-0
lines changed
tools/testing/selftests/ublk Expand file tree Collapse file tree 3 files changed +77
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ TEST_PROGS += test_stripe_04.sh
21
21
22
22
TEST_PROGS += test_stress_01.sh
23
23
TEST_PROGS += test_stress_02.sh
24
+ TEST_PROGS += test_stress_03.sh
25
+ TEST_PROGS += test_stress_04.sh
24
26
25
27
TEST_GEN_PROGS_EXTENDED = kublk
26
28
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # SPDX-License-Identifier: GPL-2.0
3
+
4
+ . " $( cd " $( dirname " $0 " ) " && pwd) " /test_common.sh
5
+ TID=" stress_03"
6
+ ERR_CODE=0
7
+
8
+ ublk_io_and_remove ()
9
+ {
10
+ run_io_and_remove " $@ "
11
+ ERR_CODE=$?
12
+ if [ ${ERR_CODE} -ne 0 ]; then
13
+ echo " $TID failure: $* "
14
+ _show_result $TID $ERR_CODE
15
+ fi
16
+ }
17
+
18
+ if ! _have_program fio; then
19
+ exit " $UBLK_SKIP_CODE "
20
+ fi
21
+
22
+ if ! _have_feature " ZERO_COPY" ; then
23
+ exit " $UBLK_SKIP_CODE "
24
+ fi
25
+
26
+ _prep_test " stress" " run IO and remove device(zero copy)"
27
+
28
+ _create_backfile 0 256M
29
+ _create_backfile 1 128M
30
+ _create_backfile 2 128M
31
+
32
+ ublk_io_and_remove 8G -t null -q 4 -z &
33
+ ublk_io_and_remove 256M -t loop -q 4 -z " ${UBLK_BACKFILES[0]} " &
34
+ ublk_io_and_remove 256M -t stripe -q 4 -z " ${UBLK_BACKFILES[1]} " " ${UBLK_BACKFILES[2]} " &
35
+ wait
36
+
37
+ _cleanup_test " stress"
38
+ _show_result $TID $ERR_CODE
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # SPDX-License-Identifier: GPL-2.0
3
+
4
+ . " $( cd " $( dirname " $0 " ) " && pwd) " /test_common.sh
5
+ TID=" stress_04"
6
+ ERR_CODE=0
7
+
8
+ ublk_io_and_kill_daemon ()
9
+ {
10
+ run_io_and_kill_daemon " $@ "
11
+ ERR_CODE=$?
12
+ if [ ${ERR_CODE} -ne 0 ]; then
13
+ echo " $TID failure: $* "
14
+ _show_result $TID $ERR_CODE
15
+ fi
16
+ }
17
+
18
+ if ! _have_program fio; then
19
+ exit " $UBLK_SKIP_CODE "
20
+ fi
21
+ if ! _have_feature " ZERO_COPY" ; then
22
+ exit " $UBLK_SKIP_CODE "
23
+ fi
24
+
25
+ _prep_test " stress" " run IO and kill ublk server(zero copy)"
26
+
27
+ _create_backfile 0 256M
28
+ _create_backfile 1 128M
29
+ _create_backfile 2 128M
30
+
31
+ ublk_io_and_kill_daemon 8G -t null -q 4 -z &
32
+ ublk_io_and_kill_daemon 256M -t loop -q 4 -z " ${UBLK_BACKFILES[0]} " &
33
+ ublk_io_and_kill_daemon 256M -t stripe -q 4 -z " ${UBLK_BACKFILES[1]} " " ${UBLK_BACKFILES[2]} " &
34
+ wait
35
+
36
+ _cleanup_test " stress"
37
+ _show_result $TID $ERR_CODE
You can’t perform that action at this time.
0 commit comments