Enable io_uring to avoid below test failure.
block/035 (shared tag set fairness) [failed]
runtime ... 0.540s
--- tests/block/035.out 2024-09-03 04:31:30.000000000 +0000
+++ /usr/local/blktests/results/nodev/block/035.out.bad 2024-11-25 17:30:10.726751452 +0000
@@ -1,2 +1,2 @@
Running block/035
-Passed
+Failed (fio status = 2)
Signed-off-by: Frank Liang <xiliang@xxxxxxxxxx>
---
tests/block/035 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/block/035 b/tests/block/035
index 4228dd0..f602e9a 100755
--- a/tests/block/035
+++ b/tests/block/035
@@ -55,6 +55,11 @@ test() {
echo "Configuring null_blk failed (2/2)"
return 1
fi
+ # enable io_uring when it is disabled
+ local io_uring_disabled=$(cat /proc/sys/kernel/io_uring_disabled)
+ if [ $io_uring_disabled != 0 ]; then
+ echo 0 > /proc/sys/kernel/io_uring_disabled
+ fi
local fio_output=${RESULTS_DIR}/block/fio-output-block-035.txt
fio --rw=randwrite --ioengine=io_uring --iodepth=64 \
--direct=1 --runtime="${runtime}" --time_based=1 \
@@ -66,6 +71,10 @@ test() {
local fio_status=$?
rmdir /sys/kernel/config/nullb/nullb*
_exit_null_blk
+ # reset io_uring setting before exits test
+ if [ $io_uring_disabled != 0 ]; then
+ echo $io_uring_disabled > /proc/sys/kernel/io_uring_disabled
+ fi
if [ $fio_status != 0 ]; then
echo "Failed (fio status = $fio_status)"
return
--
2.47.0
block/035 (shared tag set fairness) [failed]
runtime ... 0.540s
--- tests/block/035.out 2024-09-03 04:31:30.000000000 +0000
+++ /usr/local/blktests/results/nodev/block/035.out.bad 2024-11-25 17:30:10.726751452 +0000
@@ -1,2 +1,2 @@
Running block/035
-Passed
+Failed (fio status = 2)
Signed-off-by: Frank Liang <xiliang@xxxxxxxxxx>
---
tests/block/035 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/block/035 b/tests/block/035
index 4228dd0..f602e9a 100755
--- a/tests/block/035
+++ b/tests/block/035
@@ -55,6 +55,11 @@ test() {
echo "Configuring null_blk failed (2/2)"
return 1
fi
+ # enable io_uring when it is disabled
+ local io_uring_disabled=$(cat /proc/sys/kernel/io_uring_disabled)
+ if [ $io_uring_disabled != 0 ]; then
+ echo 0 > /proc/sys/kernel/io_uring_disabled
+ fi
local fio_output=${RESULTS_DIR}/block/fio-output-block-035.txt
fio --rw=randwrite --ioengine=io_uring --iodepth=64 \
--direct=1 --runtime="${runtime}" --time_based=1 \
@@ -66,6 +71,10 @@ test() {
local fio_status=$?
rmdir /sys/kernel/config/nullb/nullb*
_exit_null_blk
+ # reset io_uring setting before exits test
+ if [ $io_uring_disabled != 0 ]; then
+ echo $io_uring_disabled > /proc/sys/kernel/io_uring_disabled
+ fi
if [ $fio_status != 0 ]; then
echo "Failed (fio status = $fio_status)"
return
--
2.47.0
From d2d64b7ee418c48ab475e13c2081a149d02d7db4 Mon Sep 17 00:00:00 2001 From: Frank Liang <xiliang@xxxxxxxxxx> Date: Thu, 28 Nov 2024 22:19:20 +0800 Subject: [PATCH] block/35: enable io_uring if it is disabled Enable io_uring to avoid below test failure. block/035 (shared tag set fairness) [failed] runtime ... 0.540s --- tests/block/035.out 2024-09-03 04:31:30.000000000 +0000 +++ /usr/local/blktests/results/nodev/block/035.out.bad 2024-11-25 17:30:10.726751452 +0000 @@ -1,2 +1,2 @@ Running block/035 -Passed +Failed (fio status = 2) Signed-off-by: Frank Liang <xiliang@xxxxxxxxxx> --- tests/block/035 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/block/035 b/tests/block/035 index 4228dd0..f602e9a 100755 --- a/tests/block/035 +++ b/tests/block/035 @@ -55,6 +55,11 @@ test() { echo "Configuring null_blk failed (2/2)" return 1 fi + # enable io_uring when it is disabled + local io_uring_disabled=$(cat /proc/sys/kernel/io_uring_disabled) + if [ $io_uring_disabled != 0 ]; then + echo 0 > /proc/sys/kernel/io_uring_disabled + fi local fio_output=${RESULTS_DIR}/block/fio-output-block-035.txt fio --rw=randwrite --ioengine=io_uring --iodepth=64 \ --direct=1 --runtime="${runtime}" --time_based=1 \ @@ -66,6 +71,10 @@ test() { local fio_status=$? rmdir /sys/kernel/config/nullb/nullb* _exit_null_blk + # reset io_uring setting before exits test + if [ $io_uring_disabled != 0 ]; then + echo $io_uring_disabled > /proc/sys/kernel/io_uring_disabled + fi if [ $fio_status != 0 ]; then echo "Failed (fio status = $fio_status)" return -- 2.47.0