diff mbox series

[V2,4/8] nvme/024: use consistent coding style

Message ID 20190221044248.11096-5-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series nvme: misc cleanups | expand

Commit Message

Chaitanya Kulkarni Feb. 21, 2019, 4:42 a.m. UTC
---
 tests/nvme/024     | 15 +++++----------
 tests/nvme/024.out |  1 -
 2 files changed, 5 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/tests/nvme/024 b/tests/nvme/024
index 313f778..09191c7 100755
--- a/tests/nvme/024
+++ b/tests/nvme/024
@@ -38,11 +38,10 @@  test() {
 	cat "/sys/block/${nvmedev}n1/uuid"
 	cat "/sys/block/${nvmedev}n1/wwid"
 
-	nvme smart-log "/dev/${nvmedev}" -n 1 > /dev/null 2>&1
-
-	rc=$?
-
-	nvme disconnect -n "${subsys_name}"
+	if ! nvme smart-log "/dev/${nvmedev}" -n 1 > /dev/null 2>&1; then
+		echo "ERROR: smart-log file-ns failed"
+	fi
+	nvme disconnect -n "${subsys_name}" > /dev/null 2>&1
 
 	_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
 	_remove_nvmet_subsystem "${subsys_name}"
@@ -53,9 +52,5 @@  test() {
 	modprobe -r nvme-loop
 	modprobe -r nvmet
 
-	if [ $rc -ne 0 ]; then
-		echo "Test Failed"
-	else
-		echo "Test complete"
-	fi
+	echo "Test complete"
 }
diff --git a/tests/nvme/024.out b/tests/nvme/024.out
index 737d22f..0b1a350 100644
--- a/tests/nvme/024.out
+++ b/tests/nvme/024.out
@@ -1,5 +1,4 @@ 
 Running nvme/024
 91fdba0d-f87b-4c25-b80f-db7be1418b9e
 uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
-NQN:blktests-subsystem-1 disconnected 1 controller(s)
 Test complete