Skip to content

Commit cc9c46e

Browse files
authored
Merge pull request #212 from yizhanglinux/zbd-012-fix
zbd/012, block/041, scsi/008: enable io_uring if it's disabled
2 parents 69591d9 + 54c1062 commit cc9c46e

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

tests/block/041

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ test_device() {
4848
bs=$(_min_io "$TEST_DEV")
4949
md_per_io_size=$((bs * lbmd_size / lbmd_interval))
5050

51+
# enable io_uring when it is disabled
52+
_io_uring_enable
53+
5154
local fio_args=(
5255
--name=pi_read_test
5356
--filename="$TEST_DEV"
@@ -67,5 +70,9 @@ test_device() {
6770
)
6871

6972
_run_fio "${fio_args[@]}"
73+
74+
# reset io_uring setting before exits test
75+
_io_uring_restore
76+
7077
echo "Test complete"
7178
}

tests/scsi/008

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ test() {
6161
local scsi_debug_params=(
6262
delay=0
6363
)
64+
65+
# enable io_uring when it is disabled
66+
_io_uring_enable
67+
6468
_configure_scsi_debug "${scsi_debug_params[@]}" &&
6569
local dev="/dev/${SCSI_DEBUG_DEVICES[0]}" fail &&
6670
ls -ldi "${dev}" >>"${FULL}" &&
@@ -72,6 +76,9 @@ test() {
7276

7377
_exit_scsi_debug
7478

79+
# reset io_uring setting before exits test
80+
_io_uring_restore
81+
7582
if [ -z "$fail" ]; then
7683
echo "Test complete"
7784
else

tests/zbd/012

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ toggle_iosched() {
2929
test() {
3030
echo "Running ${TEST_NAME}"
3131

32+
# enable io_uring when it is disabled
33+
_io_uring_enable
34+
3235
for qd in 1 2 4 8 16; do
3336
echo "$qd"
3437
local scsi_debug_params=(
@@ -75,6 +78,9 @@ test() {
7578
[ -z "$fail" ] || break
7679
done
7780

81+
# reset io_uring setting before exits test
82+
_io_uring_restore
83+
7884
if [ -z "$fail" ]; then
7985
echo "Test complete"
8086
else

0 commit comments

Comments
 (0)