diff mbox series

[8/8] nvme/028: use consistent coding style

Message ID 1550618905-4112-9-git-send-email-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series nvme: misc cleanups | expand

Commit Message

Chaitanya Kulkarni Feb. 19, 2019, 11:28 p.m. UTC
---
 tests/nvme/028     | 17 ++++++-----------
 tests/nvme/028.out |  1 -
 2 files changed, 6 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/tests/nvme/028 b/tests/nvme/028
index 3478acc..ad8e89b 100755
--- a/tests/nvme/028
+++ b/tests/nvme/028
@@ -38,11 +38,12 @@  test() {
 	cat "/sys/block/${nvmedev}n1/uuid"
 	cat "/sys/block/${nvmedev}n1/wwid"
 
-	nvme list-subsys | grep -q loop
-
-	rc=$?
-
-	nvme disconnect -n "${subsys_name}"
+	if ! nvme list-subsys | grep -q loop; then
+		echo "Test Failed"
+	else
+		echo "Test complete"
+	fi
+	nvme disconnect -n "${subsys_name}" > /dev/null 2>&1
 
 	_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
 	_remove_nvmet_subsystem "${subsys_name}"
@@ -52,10 +53,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/028.out b/tests/nvme/028.out
index c92b82d..536067f 100644
--- a/tests/nvme/028.out
+++ b/tests/nvme/028.out
@@ -1,5 +1,4 @@ 
 Running nvme/028
 91fdba0d-f87b-4c25-b80f-db7be1418b9e
 uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
-NQN:blktests-subsystem-1 disconnected 1 controller(s)
 Test complete