[3/8] nvme/023: use consistent coding style
diff mbox series

Message ID 1550618905-4112-4-git-send-email-chaitanya.kulkarni@wdc.com
State New
Headers show
Series
  • nvme: misc cleanups
Related show

Commit Message

Chaitanya Kulkarni Feb. 19, 2019, 11:28 p.m. UTC
---
 tests/nvme/023     | 16 ++++++----------
 tests/nvme/023.out |  1 -
 2 files changed, 6 insertions(+), 11 deletions(-)

Patch
diff mbox series

diff --git a/tests/nvme/023 b/tests/nvme/023
index 3475104..c220c50 100755
--- a/tests/nvme/023
+++ b/tests/nvme/023
@@ -41,11 +41,13 @@  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=$?
+	if ! nvme smart-log "/dev/${nvmedev}" -n 1 > /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}"
@@ -57,10 +59,4 @@  test() {
 
 	modprobe -r nvme-loop
 	modprobe -r nvmet
-
-	if [ $rc -ne 0 ]; then
-		echo "Test Failed"
-	else
-		echo "Test complete"
-	fi
 }
diff --git a/tests/nvme/023.out b/tests/nvme/023.out
index aeb3ea7..47c99ca 100644
--- a/tests/nvme/023.out
+++ b/tests/nvme/023.out
@@ -1,5 +1,4 @@ 
 Running nvme/023
 91fdba0d-f87b-4c25-b80f-db7be1418b9e
 uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
-NQN:blktests-subsystem-1 disconnected 1 controller(s)
 Test complete