]> www.infradead.org Git - users/hch/blktests.git/commitdiff
zbd: allow falling back to built-in null_blk builtin-drivers
authorChristoph Hellwig <hch@lst.de>
Wed, 1 Jun 2022 09:07:41 +0000 (11:07 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 7 Jun 2022 10:25:43 +0000 (12:25 +0200)
Use _configure_null_blk to configure the fallback device and thus allow
for a built-in null_blk driver.

Signed-off-by: Christoph Hellwig <hch@lst.de>
tests/zbd/rc

index 9deadc1d515b8fdbb4513d9fa15d6791b115dee6..fea55d64ea3733eead405f019711e141296f6d80 100644 (file)
@@ -13,7 +13,7 @@
 
 group_requires() {
        _have_root && _have_program blkzone && _have_program dd &&
-               _have_kernel_option BLK_DEV_ZONED && _have_modules null_blk &&
+               _have_kernel_option BLK_DEV_ZONED && _have_null_blk &&
                _have_module_param null_blk zoned
 }
 
@@ -25,10 +25,11 @@ group_device_requires() {
 }
 
 _fallback_null_blk_zoned() {
-       if ! _init_null_blk zone_size=4 gb=1 zoned=1 ; then
+       if ! _configure_null_blk nullb1 zone_size=4 size=1024 zoned=1 \
+                       power=1; then
                return 1
        fi
-       echo /dev/nullb0
+       echo /dev/nullb1
 }
 
 #