]> www.infradead.org Git - users/sagi/blktests.git/commit
block/031: allow to run with built-in null_blk driver
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 11 Jan 2024 09:00:38 +0000 (18:00 +0900)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tue, 23 Jan 2024 10:39:47 +0000 (19:39 +0900)
commit4f6b3fc593bfca8d5aedfb7f3000a820d871dbde
tree0a5beb80adc7de4911eb2ef2d704d5fe0a618753
parent4e102078d81128559befc72b24606ac039f00634
block/031: allow to run with built-in null_blk driver

The test case block/031 sets the null_blk parameter shared_tag_bitmap=1
for testing. The parameter has been set as a module parameter, so the
null_blk driver must be loadable. However, null_blk allows you to set
shared_tag_bitmap as a configfs parameter since the kernel commit
7012eef520cb ("null_blk: add configfs variables for 2 options"). The
test case can now be run with the built-in null_blk driver by specifying
shared_tag_bitmap through configfs.

Modify the test case for that purpose. Refer to the null_blk feature
list and check if shared_tag_bitmap can be specified through configfs.
If so, specify the parameter as an option of _configure_null_blk and set
it through configfs. If not, check in requires() that shared_tag_bitmap
can be specified as a module parameter. Then call _init_null_blk() in
test() and specify shared_tag_bitmap=1 at null_blk module load.

Also, change the null_blk device name from nullb0 to nullb1 since the
default null_blk device name nullb0 is not usable with the built-in
null_blk driver.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
tests/block/031