diff --git a/tests/nvme/003.out b/tests/nvme/003.out index beb35612..01b27561 100644 --- a/tests/nvme/003.out +++ b/tests/nvme/003.out @@ -1,3 +1,2 @@ Running nvme/003 -NQN:nqn.2014-08.org.nvmexpress.discovery disconnected 1 controller(s) Test complete diff --git a/tests/nvme/004 b/tests/nvme/004 index 31af8737..cc5310e7 100755 --- a/tests/nvme/004 +++ b/tests/nvme/004 @@ -29,8 +29,7 @@ test() { local nvmedev nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" _nvme_disconnect_subsys ${def_subsysnqn} diff --git a/tests/nvme/004.out b/tests/nvme/004.out index 51f60522..1a4e8e4f 100644 --- a/tests/nvme/004.out +++ b/tests/nvme/004.out @@ -1,5 +1,2 @@ Running nvme/004 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/008 b/tests/nvme/008 index f4b45b2f..6ff3362e 100755 --- a/tests/nvme/008 +++ b/tests/nvme/008 @@ -27,8 +27,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/008.out b/tests/nvme/008.out index b05b46d6..5661be6b 100644 --- a/tests/nvme/008.out +++ b/tests/nvme/008.out @@ -1,5 +1,2 @@ Running nvme/008 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/009 b/tests/nvme/009 index 905de030..4ea00636 100755 --- a/tests/nvme/009 +++ b/tests/nvme/009 @@ -26,8 +26,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/009.out b/tests/nvme/009.out index 7fd27ff9..f379f7ff 100644 --- a/tests/nvme/009.out +++ b/tests/nvme/009.out @@ -1,5 +1,2 @@ Running nvme/009 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/010 b/tests/nvme/010 index e782a9bb..5ed6cb5c 100755 --- a/tests/nvme/010 +++ b/tests/nvme/010 @@ -27,8 +27,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" _run_fio_verify_io --size="${nvme_img_size}" \ --filename="/dev/${nvmedev}n1" diff --git a/tests/nvme/010.out b/tests/nvme/010.out index 788ea968..22418180 100644 --- a/tests/nvme/010.out +++ b/tests/nvme/010.out @@ -1,5 +1,2 @@ Running nvme/010 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/011 b/tests/nvme/011 index 56658f4d..f9150e06 100755 --- a/tests/nvme/011 +++ b/tests/nvme/011 @@ -27,8 +27,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" _run_fio_verify_io --size="${nvme_img_size}" \ --filename="/dev/${nvmedev}n1" diff --git a/tests/nvme/011.out b/tests/nvme/011.out index ab29fa21..98224518 100644 --- a/tests/nvme/011.out +++ b/tests/nvme/011.out @@ -1,5 +1,2 @@ Running nvme/011 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/012 b/tests/nvme/012 index 6072eed3..c5e0eb9c 100755 --- a/tests/nvme/012 +++ b/tests/nvme/012 @@ -31,8 +31,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" _xfs_run_fio_verify_io "/dev/${nvmedev}n1" diff --git a/tests/nvme/012.out b/tests/nvme/012.out index 581e686a..1a0c53e7 100644 --- a/tests/nvme/012.out +++ b/tests/nvme/012.out @@ -1,5 +1,2 @@ Running nvme/012 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/013 b/tests/nvme/013 index 60441cab..3ec280ff 100755 --- a/tests/nvme/013 +++ b/tests/nvme/013 @@ -30,8 +30,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" _xfs_run_fio_verify_io "/dev/${nvmedev}n1" diff --git a/tests/nvme/013.out b/tests/nvme/013.out index f7285a9b..ffa76254 100644 --- a/tests/nvme/013.out +++ b/tests/nvme/013.out @@ -1,5 +1,2 @@ Running nvme/013 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/014 b/tests/nvme/014 index d49e8f3c..31bfeb76 100755 --- a/tests/nvme/014 +++ b/tests/nvme/014 @@ -30,8 +30,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" size="$(blockdev --getsize64 "/dev/${nvmedev}n1")" bs="$(blockdev --getbsz "/dev/${nvmedev}n1")" diff --git a/tests/nvme/014.out b/tests/nvme/014.out index 0285826f..5d1a5178 100644 --- a/tests/nvme/014.out +++ b/tests/nvme/014.out @@ -1,6 +1,3 @@ Running nvme/014 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e NVMe Flush: success -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/015 b/tests/nvme/015 index 0813bcf5..4315ffa5 100755 --- a/tests/nvme/015 +++ b/tests/nvme/015 @@ -30,8 +30,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" size="$(blockdev --getsize64 "/dev/${nvmedev}n1")" bs="$(blockdev --getbsz "/dev/${nvmedev}n1")" diff --git a/tests/nvme/015.out b/tests/nvme/015.out index 23763f1d..0c521bd8 100644 --- a/tests/nvme/015.out +++ b/tests/nvme/015.out @@ -1,6 +1,3 @@ Running nvme/015 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e NVMe Flush: success -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/018 b/tests/nvme/018 index 00531cf2..e9017309 100755 --- a/tests/nvme/018 +++ b/tests/nvme/018 @@ -28,8 +28,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" local sectors local bs diff --git a/tests/nvme/018.out b/tests/nvme/018.out index 68a01940..8e098d92 100644 --- a/tests/nvme/018.out +++ b/tests/nvme/018.out @@ -1,5 +1,2 @@ Running nvme/018 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/019 b/tests/nvme/019 index 15e98c40..a1035ff8 100755 --- a/tests/nvme/019 +++ b/tests/nvme/019 @@ -29,8 +29,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" nvme dsm "/dev/${nvmedev}" -n 1 -d -s "${sblk_range}" -b "${nblk_range}" diff --git a/tests/nvme/019.out b/tests/nvme/019.out index 3e649a4b..9e984554 100644 --- a/tests/nvme/019.out +++ b/tests/nvme/019.out @@ -1,6 +1,3 @@ Running nvme/019 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e NVMe DSM: success -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/020 b/tests/nvme/020 index 59c1179d..ba3f4c8a 100755 --- a/tests/nvme/020 +++ b/tests/nvme/020 @@ -28,8 +28,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" nvme dsm "/dev/${nvmedev}" -n 1 -d -s "${sblk_range}" -b "${nblk_range}" diff --git a/tests/nvme/020.out b/tests/nvme/020.out index 113c1779..9e2e2141 100644 --- a/tests/nvme/020.out +++ b/tests/nvme/020.out @@ -1,6 +1,3 @@ Running nvme/020 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e NVMe DSM: success -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/021 b/tests/nvme/021 index 2277fe52..82a46344 100755 --- a/tests/nvme/021 +++ b/tests/nvme/021 @@ -27,14 +27,13 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" if ! nvme list 2>> "$FULL" | grep -q "${nvmedev}n1"; then echo "ERROR: device not listed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/021.out b/tests/nvme/021.out index b6b1a7ce..c86ee748 100644 --- a/tests/nvme/021.out +++ b/tests/nvme/021.out @@ -1,4 +1,2 @@ Running nvme/021 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e Test complete diff --git a/tests/nvme/022 b/tests/nvme/022 index a74eba30..adef181a 100755 --- a/tests/nvme/022 +++ b/tests/nvme/022 @@ -27,14 +27,13 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" if ! nvme reset "/dev/${nvmedev}" >> "$FULL" 2>&1; then echo "ERROR: reset failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/022.out b/tests/nvme/022.out index 1d393dbb..dace7612 100644 --- a/tests/nvme/022.out +++ b/tests/nvme/022.out @@ -1,4 +1,2 @@ Running nvme/022 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e Test complete diff --git a/tests/nvme/023 b/tests/nvme/023 index c8d1e461..00ea3bca 100755 --- a/tests/nvme/023 +++ b/tests/nvme/023 @@ -27,14 +27,13 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" if ! nvme smart-log "/dev/${nvmedev}" -n 1 >> "$FULL" 2>&1; then echo "ERROR: smart-log bdev-ns failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/023.out b/tests/nvme/023.out index 47c99ca0..aa5d2906 100644 --- a/tests/nvme/023.out +++ b/tests/nvme/023.out @@ -1,4 +1,2 @@ Running nvme/023 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e Test complete diff --git a/tests/nvme/024 b/tests/nvme/024 index d21bcce2..0c4fb6bc 100755 --- a/tests/nvme/024 +++ b/tests/nvme/024 @@ -27,13 +27,12 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" if ! nvme smart-log "/dev/${nvmedev}" -n 1 >> "$FULL" 2>&1; then echo "ERROR: smart-log file-ns failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/024.out b/tests/nvme/024.out index 0b1a3502..76c3e293 100644 --- a/tests/nvme/024.out +++ b/tests/nvme/024.out @@ -1,4 +1,2 @@ Running nvme/024 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e Test complete diff --git a/tests/nvme/025 b/tests/nvme/025 index 5912e5d1..5b4fbf64 100755 --- a/tests/nvme/025 +++ b/tests/nvme/025 @@ -27,14 +27,13 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" if ! nvme effects-log "/dev/${nvmedev}" >> "$FULL" 2>&1; then echo "ERROR: effects-log failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/025.out b/tests/nvme/025.out index f15ff2ff..66d646e3 100644 --- a/tests/nvme/025.out +++ b/tests/nvme/025.out @@ -1,4 +1,2 @@ Running nvme/025 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e Test complete diff --git a/tests/nvme/026 b/tests/nvme/026 index b6bc7799..9017ade7 100755 --- a/tests/nvme/026 +++ b/tests/nvme/026 @@ -27,14 +27,13 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" if ! nvme ns-descs "/dev/${nvmedev}" -n 1 >> "$FULL" 2>&1; then echo "ERROR: ns-desc failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/026.out b/tests/nvme/026.out index c934cac9..69a05de2 100644 --- a/tests/nvme/026.out +++ b/tests/nvme/026.out @@ -1,4 +1,2 @@ Running nvme/026 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e Test complete diff --git a/tests/nvme/027 b/tests/nvme/027 index 3993fb5f..1a576a8e 100755 --- a/tests/nvme/027 +++ b/tests/nvme/027 @@ -27,14 +27,13 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" if ! nvme ns-rescan "/dev/${nvmedev}" >> "$FULL" 2>&1; then echo "ERROR: ns-rescan failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/027.out b/tests/nvme/027.out index 5c6ed263..621a4040 100644 --- a/tests/nvme/027.out +++ b/tests/nvme/027.out @@ -1,4 +1,2 @@ Running nvme/027 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e Test complete diff --git a/tests/nvme/028 b/tests/nvme/028 index e5223815..874c1da6 100755 --- a/tests/nvme/028 +++ b/tests/nvme/028 @@ -27,14 +27,13 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" if ! nvme list-subsys 2>> "$FULL" | grep -q "${nvme_trtype}"; then echo "ERROR: list-subsys" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/028.out b/tests/nvme/028.out index 536067f6..7cfd2d30 100644 --- a/tests/nvme/028.out +++ b/tests/nvme/028.out @@ -1,4 +1,2 @@ Running nvme/028 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e Test complete diff --git a/tests/nvme/029 b/tests/nvme/029 index bbc48143..7c68d7f9 100755 --- a/tests/nvme/029 +++ b/tests/nvme/029 @@ -60,8 +60,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - cat "/sys/block/${nvmedev}n1/uuid" - cat "/sys/block/${nvmedev}n1/wwid" + _check_uuid "${nvmedev}" local dev="/dev/${nvmedev}n1" test_user_io "$dev" 1 512 > "$FULL" 2>&1 || echo FAIL @@ -71,7 +70,7 @@ test() { test_user_io "$dev" 511 1023 > "$FULL" 2>&1 || echo FAIL test_user_io "$dev" 511 1025 > "$FULL" 2>&1 || echo FAIL - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/029.out b/tests/nvme/029.out index 00210038..745f1425 100644 --- a/tests/nvme/029.out +++ b/tests/nvme/029.out @@ -1,4 +1,2 @@ Running nvme/029 -91fdba0d-f87b-4c25-b80f-db7be1418b9e -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e Test complete diff --git a/tests/nvme/031 b/tests/nvme/031 index ed5f1966..a5c38086 100755 --- a/tests/nvme/031 +++ b/tests/nvme/031 @@ -44,7 +44,7 @@ test() { _add_nvmet_subsys_to_port "${port}" "${subsys}$i" _create_nvmet_host "${subsys}$i" "${def_hostnqn}" _nvme_connect_subsys "${nvme_trtype}" "${subsys}$i" - _nvme_disconnect_subsys "${subsys}$i" >> "${FULL}" 2>&1 + _nvme_disconnect_subsys "${subsys}$i" _remove_nvmet_subsystem_from_port "${port}" "${subsys}$i" _remove_nvmet_subsystem "${subsys}$i" _remove_nvmet_host "${def_hostnqn}" diff --git a/tests/nvme/033.out b/tests/nvme/033.out index eb508be6..9648c73a 100644 --- a/tests/nvme/033.out +++ b/tests/nvme/033.out @@ -1,3 +1,2 @@ Running nvme/033 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/034.out b/tests/nvme/034.out index 0a7bd2f9..5c851b46 100644 --- a/tests/nvme/034.out +++ b/tests/nvme/034.out @@ -1,3 +1,2 @@ Running nvme/034 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/035.out b/tests/nvme/035.out index a6027138..455110c0 100644 --- a/tests/nvme/035.out +++ b/tests/nvme/035.out @@ -1,3 +1,2 @@ Running nvme/035 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/036.out b/tests/nvme/036.out index d294f864..58676b1c 100644 --- a/tests/nvme/036.out +++ b/tests/nvme/036.out @@ -1,3 +1,2 @@ Running nvme/036 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/037 b/tests/nvme/037 index a2815b3f..b1ebe1e6 100755 --- a/tests/nvme/037 +++ b/tests/nvme/037 @@ -26,7 +26,7 @@ test_device() { nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" \ "${subsys}${i}") - _nvme_disconnect_subsys "${subsys}${i}" >>"${FULL}" 2>&1 + _nvme_disconnect_subsys "${subsys}${i}" _nvmet_passthru_target_cleanup "${subsys}${i}" done diff --git a/tests/nvme/041.out b/tests/nvme/041.out index efee74c8..12041736 100644 --- a/tests/nvme/041.out +++ b/tests/nvme/041.out @@ -1,6 +1,4 @@ Running nvme/041 Test unauthenticated connection (should fail) -NQN:blktests-subsystem-1 disconnected 0 controller(s) Test authenticated connection -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/042.out b/tests/nvme/042.out index 7d3d21a4..1c3fc613 100644 --- a/tests/nvme/042.out +++ b/tests/nvme/042.out @@ -1,16 +1,9 @@ Running nvme/042 Testing hmac 0 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing hmac 1 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing hmac 2 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing hmac 3 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing key length 32 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing key length 48 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing key length 64 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/043.out b/tests/nvme/043.out index 7419f913..f3f55a44 100644 --- a/tests/nvme/043.out +++ b/tests/nvme/043.out @@ -1,18 +1,10 @@ Running nvme/043 Testing hash hmac(sha256) -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing hash hmac(sha384) -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing hash hmac(sha512) -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing DH group ffdhe2048 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing DH group ffdhe3072 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing DH group ffdhe4096 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing DH group ffdhe6144 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Testing DH group ffdhe8192 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/044.out b/tests/nvme/044.out index 53fdbe12..00bdcdb5 100644 --- a/tests/nvme/044.out +++ b/tests/nvme/044.out @@ -1,10 +1,6 @@ Running nvme/044 Test host authentication -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test invalid ctrl authentication (should fail) -NQN:blktests-subsystem-1 disconnected 0 controller(s) Test valid ctrl authentication -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test invalid ctrl key (should fail) -NQN:blktests-subsystem-1 disconnected 0 controller(s) Test complete diff --git a/tests/nvme/045.out b/tests/nvme/045.out index 48f7e6b3..565c5634 100644 --- a/tests/nvme/045.out +++ b/tests/nvme/045.out @@ -8,5 +8,4 @@ Change DH group to ffdhe8192 Re-authenticate with changed DH group Change hash to hmac(sha512) Re-authenticate with changed hash -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/047 b/tests/nvme/047 index 94d7d50f..f5fb9f2f 100755 --- a/tests/nvme/047 +++ b/tests/nvme/047 @@ -35,7 +35,7 @@ test() { rand_io_size="$(_nvme_calc_rand_io_size 4M)" _run_fio_rand_io --filename="/dev/${nvmedev}n1" --size="${rand_io_size}" - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ --nr-write-queues 1 \ @@ -43,7 +43,7 @@ test() { _run_fio_rand_io --filename="/dev/${nvmedev}n1" --size="${rand_io_size}" - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/048.out b/tests/nvme/048.out index 7f986ef9..65ffa47e 100644 --- a/tests/nvme/048.out +++ b/tests/nvme/048.out @@ -1,3 +1,2 @@ Running nvme/048 -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete diff --git a/tests/nvme/rc b/tests/nvme/rc index 1cff522d..a2e45295 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -430,7 +430,7 @@ _nvme_disconnect_ctrl() { _nvme_disconnect_subsys() { local subsysnqn="$1" - nvme disconnect -n "${subsysnqn}" + nvme disconnect -n "${subsysnqn}" >> "$FULL" 2>&1 } _nvme_connect_subsys() { @@ -959,6 +959,27 @@ _check_genctr() { echo "${genctr}" } +_check_uuid() { + local nvmedev=$1 + local nr_nsid=0 + + for ns in "/sys/block/${nvmedev}n"* ; do + [ -e "${ns}/wwid" ] || continue + nr_nsid=$((nr_nsid + 1)) + [ -e "${ns}/uuid" ] || continue + uuid=$(cat "${ns}/uuid") + wwid=$(cat "${ns}/wwid") + if [ "${uuid}" != "${wwid#uuid.}" ]; then + echo "UUID ${uuid} mismatch (wwid ${wwid})" + return 1 + fi + done + if [ $nr_nsid -eq 0 ] ; then + echo "No namespaces found" + return 1 + fi +} + declare -A NS_DEV_FAULT_INJECT_SAVE declare -A CTRL_DEV_FAULT_INJECT_SAVE