Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for pre-defined UUID and subsystem NQN #127

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/nvme/003.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
Running nvme/003
NQN:nqn.2014-08.org.nvmexpress.discovery disconnected 1 controller(s)
Test complete
3 changes: 1 addition & 2 deletions tests/nvme/004
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/004.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/008
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/008.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/009
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/009.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/010
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/010.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/011
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/011.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/012
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/012.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/013
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/013.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/014
Original file line number Diff line number Diff line change
Expand Up @@ -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")"
Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/014.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/015
Original file line number Diff line number Diff line change
Expand Up @@ -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")"
Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/015.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/018
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/018.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/019
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/019.out
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions tests/nvme/020
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
3 changes: 0 additions & 3 deletions tests/nvme/020.out
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions tests/nvme/021
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions tests/nvme/021.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Running nvme/021
91fdba0d-f87b-4c25-b80f-db7be1418b9e
uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
Test complete
5 changes: 2 additions & 3 deletions tests/nvme/022
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions tests/nvme/022.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Running nvme/022
91fdba0d-f87b-4c25-b80f-db7be1418b9e
uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
Test complete
5 changes: 2 additions & 3 deletions tests/nvme/023
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions tests/nvme/023.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Running nvme/023
91fdba0d-f87b-4c25-b80f-db7be1418b9e
uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
Test complete
5 changes: 2 additions & 3 deletions tests/nvme/024
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions tests/nvme/024.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Running nvme/024
91fdba0d-f87b-4c25-b80f-db7be1418b9e
uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
Test complete
5 changes: 2 additions & 3 deletions tests/nvme/025
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions tests/nvme/025.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Running nvme/025
91fdba0d-f87b-4c25-b80f-db7be1418b9e
uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
Test complete
5 changes: 2 additions & 3 deletions tests/nvme/026
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions tests/nvme/026.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Running nvme/026
91fdba0d-f87b-4c25-b80f-db7be1418b9e
uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
Test complete
5 changes: 2 additions & 3 deletions tests/nvme/027
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions tests/nvme/027.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Running nvme/027
91fdba0d-f87b-4c25-b80f-db7be1418b9e
uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
Test complete
5 changes: 2 additions & 3 deletions tests/nvme/028
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions tests/nvme/028.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Running nvme/028
91fdba0d-f87b-4c25-b80f-db7be1418b9e
uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
Test complete
5 changes: 2 additions & 3 deletions tests/nvme/029
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
2 changes: 0 additions & 2 deletions tests/nvme/029.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Running nvme/029
91fdba0d-f87b-4c25-b80f-db7be1418b9e
uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
Test complete
Loading
Loading