From 5cbd1644e0dcfeb55e6cb4717259778ed11cc70e Mon Sep 17 00:00:00 2001 From: Shin'ichiro Kawasaki Date: Fri, 25 Apr 2025 14:21:46 +0900 Subject: [PATCH] t/zbd: set badblocks related parameters in run-tests-against-nullb As a preparation to add test cases which check that the continue_on_error option and the recover_zbd_write_error option work when bad blocks cause IO errors, set additional null_blk parameters badblocks_once and badblocks_partial_io. These parameters were added to Linux kernel version 6.15-rc1 and allows more realistic scenario of write failures on zoned block devices. The former parameter makes the specified badblocks recover after the first write, and the latter parameter leaves partially written data on the device. Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20250425052148.126788-7-shinichiro.kawasaki@wdc.com Signed-off-by: Jens Axboe --- t/zbd/run-tests-against-nullb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/zbd/run-tests-against-nullb b/t/zbd/run-tests-against-nullb index 97d29966..f1cba355 100755 --- a/t/zbd/run-tests-against-nullb +++ b/t/zbd/run-tests-against-nullb @@ -91,6 +91,9 @@ configure_nullb() fi fi + [[ -w badblocks_once ]] && echo 1 > badblocks_once + [[ -w badblocks_partial_io ]] && echo 1 > badblocks_partial_io + echo 1 > power || return $? return 0 } -- 2.25.1