@@ -38,11 +38,13 @@ test() {
cat "/sys/block/${nvmedev}n1/uuid"
cat "/sys/block/${nvmedev}n1/wwid"
- nvme ns-rescan "/dev/${nvmedev}" > /dev/null 2>&1
-
- rc=$?
+ if ! nvme ns-rescan "/dev/${nvmedev}" > /dev/null 2>&1; then
+ echo "Test Failed"
+ else
+ echo "Test complete"
+ fi
- nvme disconnect -n "${subsys_name}"
+ nvme disconnect -n "${subsys_name}" > /dev/null 2>&1
_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
_remove_nvmet_subsystem "${subsys_name}"
@@ -52,10 +54,4 @@ test() {
modprobe -r nvme-loop
modprobe -r nvmet
-
- if [ $rc -ne 0 ]; then
- echo "Test Failed"
- else
- echo "Test complete"
- fi
}
@@ -1,5 +1,4 @@
Running nvme/027
91fdba0d-f87b-4c25-b80f-db7be1418b9e
uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
-NQN:blktests-subsystem-1 disconnected 1 controller(s)
Test complete