From patchwork Thu Feb 21 04:42:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10823127 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 15A20180E for ; Thu, 21 Feb 2019 04:42:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05B5B3005F for ; Thu, 21 Feb 2019 04:42:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE14530062; Thu, 21 Feb 2019 04:42: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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 948923005F for ; Thu, 21 Feb 2019 04:42:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726113AbfBUEm6 (ORCPT ); Wed, 20 Feb 2019 23:42:58 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:38322 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbfBUEm5 (ORCPT ); Wed, 20 Feb 2019 23:42: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=1550724238; x=1582260238; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xy3WHqkNTX9XVP8XhPBjbq8SD/4bfAnkuNIq9SDn8Ro=; b=R8ydKMb1oYHV1hjOhZUHkD2F5aP/vBpYwI2GvR27o34wit1+J521TU2T FajkU6RDD3WcFNaNWZEk6RguXrc4sBvg3eYGGyy2px3zlO/tblhgokaXK tP/IcuCDGe+Bos0WQgaZBY8QhJkU5tsfVn0CRWENs0P1LFPTQXUjGl9SD NaXOjP8EI8T2a23E81TE5bbptN1R6J5Hmf2KEWY/Q7oM7P2EPMF01t3oQ IDirGUFaQPggtymZQIiQK4iQCLKBSG7UddUN2Wq1mtwS7Ns0/Z2fjZTZU onCbZ07bBIlBHKW7rX/77y3AatRLmLXYfjoebBoIjK8eaGQSK5k5XGSBN w==; X-IronPort-AV: E=Sophos;i="5.58,393,1544457600"; d="scan'208";a="200133587" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2019 12:43:58 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 20 Feb 2019 20:23:19 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2019 20:42:57 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, Chaitanya Kulkarni Subject: [PATCH V2 1/8] nvme/021: use consistent coding style Date: Wed, 20 Feb 2019 20:42:41 -0800 Message-Id: <20190221044248.11096-2-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> References: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 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 | 14 +++++--------- tests/nvme/021.out | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/nvme/021 b/tests/nvme/021 index 8e9512a..fe7ac5b 100755 --- a/tests/nvme/021 +++ b/tests/nvme/021 @@ -38,11 +38,11 @@ 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 "ERROR: device not listed" + 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 +53,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/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 Thu Feb 21 04:42:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10823129 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 CD9BB180E for ; Thu, 21 Feb 2019 04:43:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC7A530062 for ; Thu, 21 Feb 2019 04:43:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0CD430065; Thu, 21 Feb 2019 04:43: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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 4A4E830062 for ; Thu, 21 Feb 2019 04:43:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726109AbfBUEnD (ORCPT ); Wed, 20 Feb 2019 23:43:03 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:38362 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbfBUEnD (ORCPT ); Wed, 20 Feb 2019 23:43: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=1550724247; x=1582260247; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eoWFxH7/RaVaIjIa2jYOPopZ4mbNcHlMqa2P+Kmyasw=; b=E56bVCryuRAu6RGbbz/6F6m1crTtDYIt58ev/wAnL8wOxfzGJD6uVodY +l6OL7DwGoJoEJoxWu29JIaI6aJ+23eJfucmYaBw2yW9sfHu0bxvcaIO2 Di6bBY7yEGl8vtTh9Ja51t9roG53i7K9NmAJysoLGkJm4CMUPiFWIr+7S Trd5IzEQLPLr8p2WtyLznUZFfMZ4BqtGKOKhrqMY1pNy72FA2OW34YZJh GkZGBJQ2MbLrdjW1s7o1K3ziDh4Fc2IS+YmBQvxnq7ufN4XdiqMuvhuie UiY8OoJNJoqa+rDbX7rcWSmUNazyx2DOQ0a+qGPeN28dQbFyBs0uQMa18 w==; X-IronPort-AV: E=Sophos;i="5.58,393,1544457600"; d="scan'208";a="200133605" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2019 12:44:07 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 20 Feb 2019 20:23:25 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2019 20:43:02 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, Chaitanya Kulkarni Subject: [PATCH V2 2/8] nvme/022: use consistent coding style Date: Wed, 20 Feb 2019 20:42:42 -0800 Message-Id: <20190221044248.11096-3-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> References: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 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 | 14 +++++--------- tests/nvme/022.out | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/nvme/022 b/tests/nvme/022 index 8f89d03..35ab3e8 100755 --- a/tests/nvme/022 +++ b/tests/nvme/022 @@ -38,11 +38,11 @@ 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 "ERROR: reset failed" + 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 +53,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/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 Thu Feb 21 04:42:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10823131 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 AEC07139A for ; Thu, 21 Feb 2019 04:43:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D9EB30062 for ; Thu, 21 Feb 2019 04:43:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8ED0C30065; Thu, 21 Feb 2019 04:43:07 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 35DAE30062 for ; Thu, 21 Feb 2019 04:43:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726121AbfBUEnG (ORCPT ); Wed, 20 Feb 2019 23:43:06 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:38362 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbfBUEnG (ORCPT ); Wed, 20 Feb 2019 23:43:06 -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=1550724251; x=1582260251; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MNbpWp7lv686dHrqjNtMOu5dFCCHd2utkBJa8Y9dsWs=; b=AaPE2UBhYrzi8ccY/8nIskzQzNhXafGd5Dnj0WKX2yQgBz6X1t385cFR jbBAHamzgTks0nbkQS+uUAdQiDy7qjTFTZtMYY52fKI9isKP9MpNLnS2L jEgke/i1IGEnQ6hD+JKcdkzOlvJ8DdpZMD7GDyUQuwgGqY5IuyEnSVeoY 6t8DTjSbsg6FISO/GTe1erVRDONBJ9zylViRgo+y/p0xSnozgO8zZd1pC 3P5KE+JflFp1UC0A5RZioeIaXovKS990ZKiH62ZIwmHDBUm3QO8xqp4YD 99WUCzsY5vkQVUMK6w5Z+KzkJPCBYHz8ea+PMmNNHM+MKSzZwpl/RUGPZ w==; X-IronPort-AV: E=Sophos;i="5.58,393,1544457600"; d="scan'208";a="200133630" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2019 12:44:10 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 20 Feb 2019 20:23:27 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2019 20:43:05 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, Chaitanya Kulkarni Subject: [PATCH V2 3/8] nvme/023: use consistent coding style Date: Wed, 20 Feb 2019 20:42:43 -0800 Message-Id: <20190221044248.11096-4-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> References: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 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 | 14 +++++--------- tests/nvme/023.out | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/nvme/023 b/tests/nvme/023 index 3475104..14033ed 100755 --- a/tests/nvme/023 +++ b/tests/nvme/023 @@ -41,11 +41,11 @@ 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 "ERROR: smart-log bdev-ns failed" + 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}" @@ -58,9 +58,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/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 Thu Feb 21 04:42:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10823133 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 50121180E for ; Thu, 21 Feb 2019 04:43:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FCA430062 for ; Thu, 21 Feb 2019 04:43:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3450230065; Thu, 21 Feb 2019 04:43: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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 CF1A530062 for ; Thu, 21 Feb 2019 04:43:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725920AbfBUEnK (ORCPT ); Wed, 20 Feb 2019 23:43:10 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:38362 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbfBUEnK (ORCPT ); Wed, 20 Feb 2019 23:43: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=1550724257; x=1582260257; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jnY0nacdNyOZr+E2dOsdfu1j2zW8pn1G+0mPyKJTa/Q=; b=WA2CVOk00yA4EHlQpZ+/t94U+3OKfhV+wXe5TOfBWfCDX09KaE3cILo8 cgRt38Wq0MZ4uxobfAOuR/+1WMhnegcnox4xdRduupwJQ7pw42MfjDoaT u3m8f8JkIKrAOYNoBdk9dWhXYr/GmYLGvKNJSDodRTMIPNfQVAWBXLOgE 0hp3ORfe+nlWh0FAnILu9TlFHOxy9rMK3OsJCwM84jkzO1Ioq7jWdvRfJ VX03oi3TT24UqGekJ3BF7FI/fi26KgjFY8AMjzhdzVt49SHTjD3HnVzSm QfWL9EupzhvPNPWFIqjWD0zVazzJ9LaLdfBp+mogp7aUz2U+s0bM+w325 w==; X-IronPort-AV: E=Sophos;i="5.58,393,1544457600"; d="scan'208";a="200133651" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2019 12:44:15 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 20 Feb 2019 20:23:31 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2019 20:43:09 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, Chaitanya Kulkarni Subject: [PATCH V2 4/8] nvme/024: use consistent coding style Date: Wed, 20 Feb 2019 20:42:44 -0800 Message-Id: <20190221044248.11096-5-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> References: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 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 | 15 +++++---------- tests/nvme/024.out | 1 - 2 files changed, 5 insertions(+), 11 deletions(-) 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 From patchwork Thu Feb 21 04:42:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10823135 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 17EB1180E for ; Thu, 21 Feb 2019 04:43:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0795E30062 for ; Thu, 21 Feb 2019 04:43:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFFEA30065; Thu, 21 Feb 2019 04:43:12 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 9F5C030062 for ; Thu, 21 Feb 2019 04:43:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726269AbfBUEnM (ORCPT ); Wed, 20 Feb 2019 23:43:12 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:38362 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbfBUEnM (ORCPT ); Wed, 20 Feb 2019 23:43:12 -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=1550724260; x=1582260260; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2NTcZx2CK6XUkjb2q/frGckCeFZc0zwvjfH8FqMKAUc=; b=K63/WnJZMNCOg1f8xrDznEXj2aNru/UZSOGbHb5BwZuyS5tInJe94T2v ceKoj6SR1iJpaeotFNiqNtRqDKrQeVBUMjNMCwAg6A1fI1HBJTQuUNN4x OSBPkgMDw5y37dIe65L7xJhtG2d88vw1DrJSroLIRJNAsccXXY404DNoa T5ScX+3LS0wfWJtyUcOxjQ1+kn+cxUCsSH/hEdEdhzqN1r2OV9Dy6uQ+l 6KjX662rTauBbmXeWKu8U3VGDagmvfz6IFGYaLfHTHFZ5QOwitOOzqRQ1 Muu6NDANElrrjjehCENhWskeF3GTk96+BSnsfTLgPmhJnk5NlKD4D3nel g==; X-IronPort-AV: E=Sophos;i="5.58,393,1544457600"; d="scan'208";a="200133653" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2019 12:44:19 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 20 Feb 2019 20:23:34 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2019 20:43:12 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, Chaitanya Kulkarni Subject: [PATCH V2 5/8] nvme/025: use consistent coding style Date: Wed, 20 Feb 2019 20:42:45 -0800 Message-Id: <20190221044248.11096-6-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> References: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 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 | 14 +++++--------- tests/nvme/025.out | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/nvme/025 b/tests/nvme/025 index 741d374..68b8ed7 100755 --- a/tests/nvme/025 +++ b/tests/nvme/025 @@ -38,11 +38,11 @@ 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 "ERROR: effects-log failed" + 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 +53,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/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 Thu Feb 21 04:42:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10823137 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 7BE1F139A for ; Thu, 21 Feb 2019 04:43:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BF0230062 for ; Thu, 21 Feb 2019 04:43:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FFB130065; Thu, 21 Feb 2019 04:43:18 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 E500930062 for ; Thu, 21 Feb 2019 04:43:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726272AbfBUEnR (ORCPT ); Wed, 20 Feb 2019 23:43:17 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:38404 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbfBUEnR (ORCPT ); Wed, 20 Feb 2019 23:43:17 -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=1550724267; x=1582260267; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ku+jq0dVyjIM5dKH2/mW0ifuisJYDNlGOya+gmn3ATU=; b=GqEF/EFO7FsBWYLxxnZSQzgqTGx3n4ZC0E3q0XP6R5iQKN/0WdHFk42S s2DEoxxzaT6bQRkGWxcrwAjkVsc06EIPoaHomRcuvZRrQ1yWRxsrojvtC eYHUnIz+84Nd6mW5Ig0v4k15wk4WdayvOIEDjOBOjPc238sUKfs1tj4xk UfYjn95S2W0Nuw6OKQN7TS4ezq3GvLTGmo7FYgkUf9e0fhr3M9pq30w4r 7MdnVu3hcb+BTBZik88q0/uY5RtZwdWAnTKU03J+MybusT54PzAvirBV7 0WfG+yj4xEO983AYKaq3TvbCy4s6uBM7v5ypCVjQcH+TexEzSPRMrbqUX g==; X-IronPort-AV: E=Sophos;i="5.58,393,1544457600"; d="scan'208";a="200133683" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2019 12:44:23 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 20 Feb 2019 20:23:36 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2019 20:43:14 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, Chaitanya Kulkarni Subject: [PATCH V2 6/8] nvme/026: use consistent coding style Date: Wed, 20 Feb 2019 20:42:46 -0800 Message-Id: <20190221044248.11096-7-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> References: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 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 | 14 +++++--------- tests/nvme/026.out | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/nvme/026 b/tests/nvme/026 index f915579..ae37aa7 100755 --- a/tests/nvme/026 +++ b/tests/nvme/026 @@ -38,11 +38,11 @@ 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 "ERROR: ns-desc failed" + 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 +53,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/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 Thu Feb 21 04:42:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10823139 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 02DE8139A for ; Thu, 21 Feb 2019 04:43:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4EAD30062 for ; Thu, 21 Feb 2019 04:43:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D993D30065; Thu, 21 Feb 2019 04:43:19 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 7B0B130062 for ; Thu, 21 Feb 2019 04:43:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726343AbfBUEnT (ORCPT ); Wed, 20 Feb 2019 23:43:19 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:38404 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbfBUEnS (ORCPT ); Wed, 20 Feb 2019 23:43:18 -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=1550724270; x=1582260270; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=50FrjVtv4Yo0aiuQreK9umXTO0POZmS9w8hYB6GM6Eo=; b=eGsbyJmqW6LPiRmN5IhHt+lhmAMAEkWKAZ6Am3CNQF4GemQwRhoOARbP Hv7CZ9XRH5q6AgZnz2o5e7TAWSIC8nKoMXwZ0lrYkRGyi6IkHWwHUFkRW /GpqUXImFqInmQJhCU6QhGe4Vbb6w3szhXEyy1Mn+UVPcdo6L1o1BUBJs 2LuTnKjY+O4HLQRLhghFcShx2Ph0h6LY7OtSou2r1YOGdLnrIcMv58IYh Xg+JRulq6Q/knzZSWSva60ikUL788UIGjZJv4bftkDkL8YWGzfkYQGKPs v3EE+0G8bO1bPsSjVdJWF4aoGA+n5iN56WgpnG73uYO+iTyexwj7H/FFN g==; X-IronPort-AV: E=Sophos;i="5.58,393,1544457600"; d="scan'208";a="200133697" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2019 12:44:26 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 20 Feb 2019 20:23:38 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2019 20:43:16 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, Chaitanya Kulkarni Subject: [PATCH V2 7/8] nvme/027: use consistent coding style Date: Wed, 20 Feb 2019 20:42:47 -0800 Message-Id: <20190221044248.11096-8-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> References: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 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 | 15 +++++---------- tests/nvme/027.out | 1 - 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/nvme/027 b/tests/nvme/027 index 8d47f56..96107e2 100755 --- a/tests/nvme/027 +++ b/tests/nvme/027 @@ -38,11 +38,10 @@ test() { cat "/sys/block/${nvmedev}n1/uuid" cat "/sys/block/${nvmedev}n1/wwid" - nvme ns-rescan "/dev/${nvmedev}" > /dev/null 2>&1 - - rc=$? - - nvme disconnect -n "${subsys_name}" + if ! nvme ns-rescan "/dev/${nvmedev}" > /dev/null 2>&1; then + echo "ERROR: ns-rescan 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/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 Thu Feb 21 04:42:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 10823141 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 5B9FC1823 for ; Thu, 21 Feb 2019 04:43:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AB9C30062 for ; Thu, 21 Feb 2019 04:43:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F5B730065; Thu, 21 Feb 2019 04:43:20 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 E4F4730064 for ; Thu, 21 Feb 2019 04:43:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726234AbfBUEnT (ORCPT ); Wed, 20 Feb 2019 23:43:19 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:38410 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726296AbfBUEnT (ORCPT ); Wed, 20 Feb 2019 23:43:19 -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=1550724270; x=1582260270; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/6Ns4WBYNXULM5BYer/n9vSXR9cU0w6TfaO/vvXnU7I=; b=GSTadN1Ya0Ter1ngr8Zv8entRh4unLnKou7WWIX65cRExnwMB7d+wF6i nx2uLIW/fu6nsFwc3R9V9Rht4GPr+dP8GLaE9h7zx8WEPlfELabCmbBnw z4THLe4w/jxxppnU0in0O7yugqyQ11CtII0KW/U2BhhFynLyQoBXrePKx WcFf5f6ab9YumUTp+cNInAlXhP3VBh5/I9Gj7Gw6k1k498l+9vS5kiwzw 4kRxbd6fh+eniYR2ljIrZo0R9iyOV04kIZxrHbEWfc27wtpnvHBvYQN4F uWjFJbZb8PqWU5sHIBEPqcOIAAykRpEguQJ1tfM7BovH5M96xFt7X3bkm Q==; X-IronPort-AV: E=Sophos;i="5.58,393,1544457600"; d="scan'208";a="200133700" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2019 12:44:30 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 20 Feb 2019 20:23:41 -0800 Received: from cmercuryqemu.hgst.com ([10.202.65.32]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2019 20:43:18 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: osandov@osandov.com, Chaitanya Kulkarni Subject: [PATCH V2 8/8] nvme/028: use consistent coding style Date: Wed, 20 Feb 2019 20:42:48 -0800 Message-Id: <20190221044248.11096-9-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> References: <20190221044248.11096-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 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 | 15 +++++---------- tests/nvme/028.out | 1 - 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/nvme/028 b/tests/nvme/028 index 3478acc..b7f84e4 100755 --- a/tests/nvme/028 +++ b/tests/nvme/028 @@ -38,11 +38,10 @@ 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 "ERROR: list-subsys" + 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/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