Linux block layer
 help / color / mirror / Atom feed
* [PATCH] blktests: Ignore errors from wait(1)
@ 2022-06-13 15:17 Jan Kara
  2022-06-13 22:48 ` Chaitanya Kulkarni
  2022-06-14  7:04 ` Shinichiro Kawasaki
  0 siblings, 2 replies; 9+ messages in thread
From: Jan Kara @ 2022-06-13 15:17 UTC (permalink / raw)
  To: osandov; +Cc: linux-block, Jan Kara

Multiple blktests use wait(1) to wait for background tasks. However in
some cases tasks can exit before wait(1) is called and in that case
wait(1) complains which breaks expected output. Make sure we ignore
output from wait(1) to avoid this breakage.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 tests/block/016 | 2 +-
 tests/block/017 | 2 +-
 tests/block/018 | 2 +-
 tests/block/024 | 2 +-
 tests/block/029 | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/block/016 b/tests/block/016
index 775069c..d399ec6 100755
--- a/tests/block/016
+++ b/tests/block/016
@@ -41,7 +41,7 @@ test() {
 	# While dd is blocked, send a signal which we know dd has a handler
 	# for.
 	kill -USR1 $!
-	wait
+	wait &>/dev/null
 
 	_exit_null_blk
 
diff --git a/tests/block/017 b/tests/block/017
index 8596888..ff68e24 100755
--- a/tests/block/017
+++ b/tests/block/017
@@ -40,7 +40,7 @@ test() {
 	sleep 0.1
 	show_inflight
 
-	wait
+	wait &>/dev/null
 	show_inflight
 
 	_exit_null_blk
diff --git a/tests/block/018 b/tests/block/018
index e7ac445..d2c97ea 100755
--- a/tests/block/018
+++ b/tests/block/018
@@ -50,7 +50,7 @@ test() {
 	dd if=/dev/nullb1 of=/dev/null bs=4096 iflag=direct count=1 status=none &
 	dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1 status=none &
 	dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1 status=none &
-	wait
+	wait &>/dev/null
 	show_times
 
 	_exit_null_blk
diff --git a/tests/block/024 b/tests/block/024
index 2a7c934..dd99f0c 100755
--- a/tests/block/024
+++ b/tests/block/024
@@ -57,7 +57,7 @@ test() {
 	dd if=/dev/nullb1 of=/dev/null bs=4096 iflag=direct count=1500 status=none &
 	dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1800 status=none &
 	dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1800 status=none &
-	wait
+	wait &>/dev/null
 	show_times
 
 	_exit_null_blk
diff --git a/tests/block/029 b/tests/block/029
index b9a897d..cb8fd03 100755
--- a/tests/block/029
+++ b/tests/block/029
@@ -41,7 +41,7 @@ test() {
 		    --runtime="${TIMEOUT}" --name=nullb1 \
 		    --output="${RESULTS_DIR}/block/fio-output-029.txt" \
 		    >>"$FULL"
-		wait
+		wait &>/dev/null
 	else
 		echo "Skipping test because $sq cannot be modified" >>"$FULL"
 	fi
-- 
2.26.2


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

end of thread, other threads:[~2022-06-16  4:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-13 15:17 [PATCH] blktests: Ignore errors from wait(1) Jan Kara
2022-06-13 22:48 ` Chaitanya Kulkarni
2022-06-14 13:15   ` Jan Kara
2022-06-15 11:30     ` Shinichiro Kawasaki
2022-06-14  7:04 ` Shinichiro Kawasaki
2022-06-14 13:18   ` Jan Kara
2022-06-15 11:50     ` Shinichiro Kawasaki
2022-06-15 16:56       ` Jan Kara
2022-06-16  4:16         ` Shinichiro Kawasaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox