From 709706209b50ae9697b25057e491ea5527178320 Mon Sep 17 00:00:00 2001 From: Dmitry Fomichev Date: Wed, 19 Jul 2023 19:57:55 +0900 Subject: [PATCH] t/zbd: fix null_blk configuration in run-tests-against-nullb Correctly set max_open in null_blk configfs. Fix displayed number of conventional zones in section config banner. Signed-off-by: Dmitry Fomichev Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20230719105756.553146-13-shinichiro.kawasaki@wdc.com Signed-off-by: Vincent Fu --- t/zbd/run-tests-against-nullb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/zbd/run-tests-against-nullb b/t/zbd/run-tests-against-nullb index 7d2c7fa8..4617e398 100755 --- a/t/zbd/run-tests-against-nullb +++ b/t/zbd/run-tests-against-nullb @@ -67,13 +67,20 @@ configure_nullb() fi echo "${zone_capacity}" > zone_capacity fi + if ((conv_pcnt)); then if ((!conv_supported)); then echo "null_blk does not support conventional zones" return 2 fi nr_conv=$((dev_size/zone_size*conv_pcnt/100)) - echo "${nr_conv}" > zone_nr_conv + else + nr_conv=0 + fi + echo "${nr_conv}" > zone_nr_conv + + if ((max_open)); then + echo "${max_open}" > zone_max_open fi fi -- 2.25.1