[PATCH] t/zbd: skip test case #13 when max_open_zones is too small

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Test case #13 of t/zbd/test-zbd-support fails when the test target
device has max_open_zones smaller than 4. To avoid the failure, add a
helper function require_max_open_zones and use it to skip the test case
when the device does not have required minimum max_open_zones.

Reported-by: Vincent Fu <vincent.fu@xxxxxxxxxxx>
Link: https://lore.kernel.org/fio/20220602015316.6ismlexb22fwd5ko@shindev/
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
---
 t/zbd/test-zbd-support | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support
index 5190ae84..d4aaa813 100755
--- a/t/zbd/test-zbd-support
+++ b/t/zbd/test-zbd-support
@@ -259,6 +259,16 @@ require_conv_zones() {
 	return 0
 }
 
+require_max_open_zones() {
+	local min=${1}
+
+	if ((max_open_zones !=0 && max_open_zones < min)); then
+		SKIP_REASON="max_open_zones of $dev is smaller than $min"
+		return 1
+	fi
+	return 0
+}
+
 # Check whether buffered writes are refused for block devices.
 test1() {
     require_block_dev || return $SKIP_TESTCASE
@@ -462,6 +472,8 @@ test12() {
 test13() {
     local size off capacity
 
+    require_max_open_zones 4 || return $SKIP_TESTCASE
+
     prep_write
     size=$((8 * zone_size))
     off=$((first_sequential_zone_sector * 512))
-- 
2.36.1




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux