@@ -109,6 +109,8 @@ The NVMe tests can be additionally parameterized via environment variables.
and 'G' postfix are supported.
- nvme_num_iter: 1000 (default)
The number of iterations a test should do.
+- nvmet_blkdev_type: 'device' (default), 'file'
+ Select different target block device type backends.
### Running nvme-rdma and SRP tests
@@ -21,6 +21,7 @@ export def_subsys_uuid="91fdba0d-f87b-4c25-b80f-db7be1418b9e"
nvme_trtype=${nvme_trtype:-"loop"}
nvme_img_size=${nvme_img_size:-"1G"}
nvme_num_iter=${nvme_num_iter:-"1000"}
+nvmet_blkdev_type=${nvmet_blkdev_type:-"device"}
# TMPDIR can not be referred out of test() or test_device() context. Instead of
# global variable def_flie_path, use this getter function.
@@ -826,7 +827,7 @@ _find_nvme_passthru_loop_dev() {
}
_nvmet_target_setup() {
- local blkdev_type="device"
+ local blkdev_type="${nvmet_blkdev_type}"
local blkdev
local ctrlkey=""
local hostkey=""
Introduce nvmet_blkdev_type environment variable which allows to control the target setup. This allows us to drop duplicate tests which just differ how the target is setup. Signed-off-by: Daniel Wagner <dwagner@suse.de> --- Documentation/running-tests.md | 2 ++ tests/nvme/rc | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)