From patchwork Tue Feb 19 23:28:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10820889 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E21613BF for ; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFCF52C455 for ; Tue, 19 Feb 2019 23:50:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E39A72D34C; Tue, 19 Feb 2019 23:50:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_RP_RNBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 646742C455 for ; Tue, 19 Feb 2019 23:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728949AbfBSXum (ORCPT ); Tue, 19 Feb 2019 18:50:42 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:8491 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726405AbfBSXum (ORCPT ); Tue, 19 Feb 2019 18:50:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550620242; x=1582156242; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=MH+sTvHYTMCmskS4oty+uhPaY+GAlN6DhFcjpPhRpBY=; b=ONpFAtS8+T1aMGpN57QlQMQkxaXCJ3hBN8amSAi6MPfdsjV70PIPkDV3 1kLakIxl4FUZSJW5l9fXRnc9GPpiksuY7HX0/NvuAyWVgOn1csGI91ZW/ 6xpsl+nHD0Qc8MtSHBHBghTczFmObrM5CnK0/2V4xjq7HR3A0mYTWfMde sMKNLnkd31zq9NzONJBMuvC8TJOSLbAvLZAnN6zoudjhXaECj4FoN23lT j04CDkTaFTvrnb9mZYCOCz5dgUd+xGXm6L71wTBvs5bp7xygO9/mKcAAY aGp9DHE4soJIS9rIePJkg+DVOmMumBJN8qXIom8EAKPSL9ALGcZHabsu4 Q==; X-IronPort-AV: E=Sophos;i="5.58,388,1544457600"; d="scan'208";a="206871419" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Feb 2019 07:28:38 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Feb 2019 15:07:02 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip01.wdc.com with ESMTP; 19 Feb 2019 15:28:39 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH 1/8] nvme/021: use consistent coding style Date: Tue, 19 Feb 2019 15:28:18 -0800 Message-Id: <1550618905-4112-2-git-send-email-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> References: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- tests/nvme/021 | 15 ++++++--------- tests/nvme/021.out | 1 - 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/tests/nvme/021 b/tests/nvme/021 index 8e9512a..f204a2f 100755 --- a/tests/nvme/021 +++ b/tests/nvme/021 @@ -38,11 +38,13 @@ test() { cat "/sys/block/${nvmedev}n1/uuid" cat "/sys/block/${nvmedev}n1/wwid" - nvme list > /dev/null 2>&1 - - rc=$? + if ! nvme list | grep -q "${nvmedev}n1" > /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}" @@ -53,9 +55,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/021.out b/tests/nvme/021.out index 5fb0601..b6b1a7c 100644 --- a/tests/nvme/021.out +++ b/tests/nvme/021.out @@ -1,5 +1,4 @@ Running nvme/021 91fdba0d-f87b-4c25-b80f-db7be1418b9e uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete From patchwork Tue Feb 19 23:28:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10820891 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4608C180E for ; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32D2C2D32A for ; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26AEA2D33F; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_RP_RNBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6ADB2D32A for ; Tue, 19 Feb 2019 23:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729042AbfBSXun (ORCPT ); Tue, 19 Feb 2019 18:50:43 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:8491 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727375AbfBSXum (ORCPT ); Tue, 19 Feb 2019 18:50:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550620242; x=1582156242; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=+6X97aczkrGshsRxSR1g3ojcMEm+vul9i8haM7p7vp4=; b=MBgxbh42Bgh2VAbMN9p4Hm6VxPUcb1gl0oOwhHDdCM6PFRGrwzyLjKzb 2WeOvF2qQ2mxgUdmund+w/Nw+MZnn/gjYo6swhrpCul3npDGwfFLGMF0l yQojoVwe8a5LDvClQuLhxbfXXGa4nUt1gw1JjrC2e8tXMSb/m1qNkEcLs Svf2wda69SxkXfpvCT9abSzkgofiugGNwz6j/82LhVQNixH5WsJWLKbNl 6wRlio6ky9w3gVBHqkpIOQaEC6WHp7EXs6ULXfdAQM2eD1YzU2hImyUFf DEioqk4WBUs0yRbRPmSTEnjQ+QvYkAEBe5r5c2XAnsD/KQ7V1f5cbbhqT g==; X-IronPort-AV: E=Sophos;i="5.58,388,1544457600"; d="scan'208";a="206871423" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Feb 2019 07:28:42 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Feb 2019 15:07:06 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip01.wdc.com with ESMTP; 19 Feb 2019 15:28:43 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH 2/8] nvme/022: use consistent coding style Date: Tue, 19 Feb 2019 15:28:19 -0800 Message-Id: <1550618905-4112-3-git-send-email-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> References: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- tests/nvme/022 | 16 ++++++---------- tests/nvme/022.out | 1 - 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/nvme/022 b/tests/nvme/022 index 8f89d03..3b5a101 100755 --- a/tests/nvme/022 +++ b/tests/nvme/022 @@ -38,11 +38,13 @@ test() { cat "/sys/block/${nvmedev}n1/uuid" cat "/sys/block/${nvmedev}n1/wwid" - nvme reset "/dev/${nvmedev}" > /dev/null 2>&1 - - rc=$? + if ! nvme reset "/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 } diff --git a/tests/nvme/022.out b/tests/nvme/022.out index 173158a..1d393db 100644 --- a/tests/nvme/022.out +++ b/tests/nvme/022.out @@ -1,5 +1,4 @@ Running nvme/022 91fdba0d-f87b-4c25-b80f-db7be1418b9e uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete From patchwork Tue Feb 19 23:28:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10820893 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2012139A for ; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 905412C455 for ; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84B2D2D34C; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_RP_RNBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 301322C455 for ; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727375AbfBSXun (ORCPT ); Tue, 19 Feb 2019 18:50:43 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:8493 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728820AbfBSXun (ORCPT ); Tue, 19 Feb 2019 18:50:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550620242; x=1582156242; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=iprgYqVvnBtgtvoOf+A59oNWqKkaJ5m2PGfv3PYB+Iw=; b=UTJeqG7OStb8O9c52/Wo66umypJ9cl7ktALwLmZLIz+SLUj6Dz0caWbm j3qUk0qjITDfThky7WpUieTWUdk61mGWVx+SYPGlhGePRw7QmuNQp/evm w6S5hMhLs/LKkBQa6U0O7xXNSheRjBPUfRX7vtb8p+5PnVQm9sckLIQZS FLUWGJ3KP20nkZ0Al1mUiIkP2vTiEmgQ9S/mMmi1IXdPzYaSl0e8+gVEu zqzAkk0HL7wNufHaAvB/VXJqCCi3+jYzUQOLtX5XJw8sYyTyqkZwtqdsU 8BjkPiR/zJ4sCT/FHOLGgb5HJoFgqbwqHSWJTu/nz2DKlW+65N0DAu1Wu w==; X-IronPort-AV: E=Sophos;i="5.58,388,1544457600"; d="scan'208";a="206871429" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Feb 2019 07:28:46 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Feb 2019 15:07:10 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip01.wdc.com with ESMTP; 19 Feb 2019 15:28:47 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH 3/8] nvme/023: use consistent coding style Date: Tue, 19 Feb 2019 15:28:20 -0800 Message-Id: <1550618905-4112-4-git-send-email-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> References: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- tests/nvme/023 | 16 ++++++---------- tests/nvme/023.out | 1 - 2 files changed, 6 insertions(+), 11 deletions(-) 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 From patchwork Tue Feb 19 23:28:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10820895 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5EF0188E for ; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B42F82C455 for ; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A89592D34C; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_RP_RNBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A5722D32A for ; Tue, 19 Feb 2019 23:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728820AbfBSXun (ORCPT ); Tue, 19 Feb 2019 18:50:43 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:8491 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726405AbfBSXun (ORCPT ); Tue, 19 Feb 2019 18:50:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550620243; x=1582156243; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=c6usQqzDVM1Wioj2ys5GceWCZ10w3XB69rk7+T5WlVw=; b=WIo/STNA0I+63xe5eNw5uNlXTVYBv12ikRhxUIL1Vv4EmJXjmEXXAk/7 5t6x43zXQiw3jcg7RxViqQVGHePTMl42OEvb1gLnhdiWzky9JD3gDxAFm 4iwRHjVm78U/XYg+tykLkNjOogGzxmhUHbRL+jUxHgwycbiZZlChmU0En GM/B+esCk8S/AaHHQPlu/8dpQ6HbcLVgtvkCVC79/kMpIXNX8n5q8eEpJ +vQQU2YOz1XehveEKYgPL/l78M14gI/vKzpfsUGYpWKFbL3BcgQIVo0Z0 FCky3iNxi6PkzU2XalMKypCAqfuuy+l3BEY8ZjW5YztCScylS6dVUvKVP Q==; X-IronPort-AV: E=Sophos;i="5.58,388,1544457600"; d="scan'208";a="206871433" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Feb 2019 07:28:50 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Feb 2019 15:07:14 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip01.wdc.com with ESMTP; 19 Feb 2019 15:28:51 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH 4/8] nvme/024: use consistent coding style Date: Tue, 19 Feb 2019 15:28:21 -0800 Message-Id: <1550618905-4112-5-git-send-email-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> References: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- tests/nvme/024 | 16 ++++++---------- tests/nvme/024.out | 1 - 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/nvme/024 b/tests/nvme/024 index 313f778..4b33717 100755 --- a/tests/nvme/024 +++ b/tests/nvme/024 @@ -38,11 +38,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}" @@ -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 } 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 From patchwork Tue Feb 19 23:28:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10820867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DCEBF1399 for ; Tue, 19 Feb 2019 23:28:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4EF329AF0 for ; Tue, 19 Feb 2019 23:28:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B09EC29727; Tue, 19 Feb 2019 23:28:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_RP_RNBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A1472929B for ; Tue, 19 Feb 2019 23:28:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727976AbfBSX25 (ORCPT ); Tue, 19 Feb 2019 18:28:57 -0500 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:4297 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728409AbfBSX25 (ORCPT ); Tue, 19 Feb 2019 18:28:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550618937; x=1582154937; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=1+QoXnegF54dAEsXRGbMvDFgTs5Z3KXA+rf0XmLa+UY=; b=dB5wRpuRa8kW17D8ESEmN/SNt80sGU45GGm5QsnnSD1E+MXe9Y2KbEoA 8DAOq/D7uwVHzosP7T+qCwBc7R+3B2mW7nFMa1BuueIcN0NsEZwPjfgoi Zks6wHHzLVe2+b0enhkfaGOylQSf+r/oLriExrIvC/AsSO7YSljG3z8Al Nbm5ci0zkUv727onBjPOBEl5Df2nmDP+cULLWeOtJrEaij/jOnfp3GX75 bn5aXNGmX6da9imQaAO41dskjsmKL2N+xr/NJkX7YYTOox96V5IhENAsK bZlkx8xepp97ujw2y4MgXp2JwTSGcoA5taHO+a/ZuKyNY1/m1ye5QFHGd w==; X-IronPort-AV: E=Sophos;i="5.58,388,1544457600"; d="scan'208";a="106651249" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Feb 2019 07:28:57 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Feb 2019 15:07:20 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip01.wdc.com with ESMTP; 19 Feb 2019 15:28:57 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH 5/8] nvme/025: use consistent coding style Date: Tue, 19 Feb 2019 15:28:22 -0800 Message-Id: <1550618905-4112-6-git-send-email-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> References: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- tests/nvme/025 | 16 ++++++---------- tests/nvme/025.out | 1 - 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/nvme/025 b/tests/nvme/025 index 741d374..c2092d3 100755 --- a/tests/nvme/025 +++ b/tests/nvme/025 @@ -38,11 +38,13 @@ test() { cat "/sys/block/${nvmedev}n1/uuid" cat "/sys/block/${nvmedev}n1/wwid" - nvme effects-log "/dev/${nvmedev}" > /dev/null 2>&1 - - rc=$? + if ! nvme effects-log "/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 } diff --git a/tests/nvme/025.out b/tests/nvme/025.out index b700bc7..f15ff2f 100644 --- a/tests/nvme/025.out +++ b/tests/nvme/025.out @@ -1,5 +1,4 @@ Running nvme/025 91fdba0d-f87b-4c25-b80f-db7be1418b9e uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete From patchwork Tue Feb 19 23:28:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10820869 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F5DA6CB for ; Tue, 19 Feb 2019 23:29:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C8AF2AA40 for ; Tue, 19 Feb 2019 23:29:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F44E2D162; Tue, 19 Feb 2019 23:29:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_RP_RNBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5B932AA40 for ; Tue, 19 Feb 2019 23:29:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728084AbfBSX3D (ORCPT ); Tue, 19 Feb 2019 18:29:03 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:47715 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728217AbfBSX3D (ORCPT ); Tue, 19 Feb 2019 18:29:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550618942; x=1582154942; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=ORKYHTG15w1z30wTTdCblPsfjNAfqAuv1I1jj9/edBU=; b=TWY90dhm++iuTV/ra7c/2iFvNJ+nJReNhCl8UvzgAgnjGkHgKbLem56j LaKubqcaaLB9I3S7TFt2epMy9fcuxZaTJSiyrQZZybrHgBshJE/l47bvG Ekj7LH8qLTPWPbJkfPt/2nWb37lmfNU9ri5zqGiSO0axrx3ymZsrf94vL bTrZkmR5saZ0heaJJYtn/BeRhWsCgo1iVaZV2JAaJHJzzPpfAHTn0Mjtr 72z1k8wMm5EI3VX1lbmhznzFlVlz+/JH8Zljhpi+Q0PMA+dfYBjzkEypr 2mgE4lmpM2X6AQbG+I2ke55ehLeqW4wYGMEfitpk5MsPsCYDUn43ZVETd w==; X-IronPort-AV: E=Sophos;i="5.58,388,1544457600"; d="scan'208";a="101666813" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Feb 2019 07:29:02 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Feb 2019 15:07:26 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip01.wdc.com with ESMTP; 19 Feb 2019 15:29:03 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH 6/8] nvme/026: use consistent coding style Date: Tue, 19 Feb 2019 15:28:23 -0800 Message-Id: <1550618905-4112-7-git-send-email-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> References: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- tests/nvme/026 | 16 ++++++---------- tests/nvme/026.out | 1 - 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/nvme/026 b/tests/nvme/026 index f915579..cdb196d 100755 --- a/tests/nvme/026 +++ b/tests/nvme/026 @@ -38,11 +38,13 @@ test() { cat "/sys/block/${nvmedev}n1/uuid" cat "/sys/block/${nvmedev}n1/wwid" - nvme ns-descs "/dev/${nvmedev}" -n 1 > /dev/null 2>&1 - - rc=$? + if ! nvme ns-descs "/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}" @@ -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 } diff --git a/tests/nvme/026.out b/tests/nvme/026.out index dcee481..c934cac 100644 --- a/tests/nvme/026.out +++ b/tests/nvme/026.out @@ -1,5 +1,4 @@ Running nvme/026 91fdba0d-f87b-4c25-b80f-db7be1418b9e uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e -NQN:blktests-subsystem-1 disconnected 1 controller(s) Test complete From patchwork Tue Feb 19 23:28:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10820871 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B5C06CB for ; Tue, 19 Feb 2019 23:29:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 775F72AA40 for ; Tue, 19 Feb 2019 23:29:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 699B02D162; Tue, 19 Feb 2019 23:29:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_RP_RNBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13E762AA40 for ; Tue, 19 Feb 2019 23:29:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728217AbfBSX3H (ORCPT ); Tue, 19 Feb 2019 18:29:07 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:47715 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728409AbfBSX3H (ORCPT ); Tue, 19 Feb 2019 18:29:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550618947; x=1582154947; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=jJ75qmxFHTb840gtqyiRvZDufw0wy+TAa++TxPlYpNw=; b=qcqILBPfKRz3FKdRb8wZ7gK46tpc1C/Rg1tXBB/VBOxgIp2JQBjAxTgD Evxz0pcky+i+6zFqVVb0z2EKB2rH3SnyvVH4JRwN+UjFnbgmZRUhEqsuh rSdw2xv30cr6xOdFmXIAaxIpnlB/DpjnZeYEXd+HzKmlk8AxvwTVhc2kG EioAaqDerSWoFu4lcK+omau/RkX4Nia350JOryGrQHad/17cJrTncYV2K 7ji/Sz8eFOscIFX6BC0s0g8tyHjoNmDASowXeA1l6FyxKcPV1iTX6GwLB UE7XBYiSfjhMTRcNZL/jq9peIVQm+s2651GhU0Tb9TrTIZKDj+Te+DUFZ A==; X-IronPort-AV: E=Sophos;i="5.58,388,1544457600"; d="scan'208";a="101666822" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Feb 2019 07:29:07 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Feb 2019 15:07:30 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip01.wdc.com with ESMTP; 19 Feb 2019 15:29:07 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH 7/8] nvme/027: use consistent coding style Date: Tue, 19 Feb 2019 15:28:24 -0800 Message-Id: <1550618905-4112-8-git-send-email-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> References: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- tests/nvme/027 | 16 ++++++---------- tests/nvme/027.out | 1 - 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/nvme/027 b/tests/nvme/027 index 8d47f56..2d11f56 100755 --- a/tests/nvme/027 +++ b/tests/nvme/027 @@ -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 } diff --git a/tests/nvme/027.out b/tests/nvme/027.out index f114fcd..5c6ed26 100644 --- a/tests/nvme/027.out +++ b/tests/nvme/027.out @@ -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 From patchwork Tue Feb 19 23:28:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10820873 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 119326CB for ; Tue, 19 Feb 2019 23:29:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F27312AA40 for ; Tue, 19 Feb 2019 23:29:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E656A2D162; Tue, 19 Feb 2019 23:29:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_RP_RNBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 944282AA40 for ; Tue, 19 Feb 2019 23:29:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728409AbfBSX3L (ORCPT ); Tue, 19 Feb 2019 18:29:11 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:47715 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729700AbfBSX3K (ORCPT ); Tue, 19 Feb 2019 18:29:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550618950; x=1582154950; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=QO44zIbPm8yUv11en4aP0hHOSIqa7BOCkxU9ZjY5Koo=; b=eJOYpCnxo9wIJyeTMVbNVQrrR/QwMfVfcwQ1evOx+f0o3l4nWGYKL8EV LUVwAGHvXI/+0PS8wsr0vrmgHV6Ukyf71d/76uRUzhuWq3o8KtY54GL7L 6DLNav10HRhSZFB9YwwZufBJNZVvvKcRIStMkt6/Q1jO60dpO16XGGiOz 6C0JAFFO8kXlPaATDTZnux/FxmluDNfo8qDiqPzS6+K07Vb+u0yRIq5E1 2uzWf0O0nHsqDuZk112wnXQIBPfetuz+AuJc4aLGVx/hZi1qKq9/rUcSW f4ydf0XO4Kmrm9iYFQvJHuIgElp9knqgF9t4Xf/zFp46rjjBa2I4+k8eN w==; X-IronPort-AV: E=Sophos;i="5.58,388,1544457600"; d="scan'208";a="101666825" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Feb 2019 07:29:10 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Feb 2019 15:07:34 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip01.wdc.com with ESMTP; 19 Feb 2019 15:29:10 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, bvanassche@acm.org, Chaitanya Kulkarni Subject: [PATCH 8/8] nvme/028: use consistent coding style Date: Tue, 19 Feb 2019 15:28:25 -0800 Message-Id: <1550618905-4112-9-git-send-email-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> References: <1550618905-4112-1-git-send-email-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- tests/nvme/028 | 17 ++++++----------- tests/nvme/028.out | 1 - 2 files changed, 6 insertions(+), 12 deletions(-) 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