All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH blktests] block/35: enable io_uring if it is disabled
@ 2024-11-28 14:30 Frank Liang
  2024-11-29 14:26 ` Jens Axboe
  2024-11-30  4:32 ` Shinichiro Kawasaki
  0 siblings, 2 replies; 4+ messages in thread
From: Frank Liang @ 2024-11-28 14:30 UTC (permalink / raw)
  To: linux-block, osandov; +Cc: Changhui Zhong, Ming Lei, Libing He


[-- Attachment #1.1: Type: text/plain, Size: 1444 bytes --]

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@redhat.com>
---
 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

[-- Attachment #1.2: Type: text/html, Size: 1737 bytes --]

[-- Attachment #2: 0001-block-35-enable-io_uring-if-it-is-disabled.patch --]
[-- Type: text/x-patch, Size: 1662 bytes --]

From d2d64b7ee418c48ab475e13c2081a149d02d7db4 Mon Sep 17 00:00:00 2001
From: Frank Liang <xiliang@redhat.com>
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@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-03  8:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-28 14:30 [PATCH blktests] block/35: enable io_uring if it is disabled Frank Liang
2024-11-29 14:26 ` Jens Axboe
2024-11-30  4:32 ` Shinichiro Kawasaki
     [not found]   ` <CAAb+4C4rH70h8ALUKktWqkyvkoij0P=2rbYUtjSzZSQ7vFoAsQ@mail.gmail.com>
2024-12-03  8:46     ` Shinichiro Kawasaki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.