From patchwork Mon May 1 22:59:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 9707289 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2076B60385 for ; Mon, 1 May 2017 23:04:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10535282E2 for ; Mon, 1 May 2017 23:04:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02B412832D; Mon, 1 May 2017 23:04: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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A5EFD282E2 for ; Mon, 1 May 2017 23:04:58 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9D5EE21951C9D; Mon, 1 May 2017 16:04:58 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8109421A04830 for ; Mon, 1 May 2017 16:04:57 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 01 May 2017 16:04:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,401,1488873600"; d="scan'208";a="96405557" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.125]) by fmsmga006.fm.intel.com with ESMTP; 01 May 2017 16:04:57 -0700 Subject: [ndctl PATCH] test, label-compat.sh: fix region determination From: Dan Williams To: linux-nvdimm@lists.01.org Date: Mon, 01 May 2017 15:59:05 -0700 Message-ID: <149367954530.14481.331986452118782394.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP The test is accidentally hard-coding the test region, "7", which we should be determining programmatically. Replace "7" with "$region", the largest pmem region on the "nfit_test.0" bus. Otherwise, the test can fail just based on the initialization order of various nvdimm buses. Signed-off-by: Dan Williams --- test/label-compat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/label-compat.sh b/test/label-compat.sh index f103f64ae7ff..ed26a583a320 100755 --- a/test/label-compat.sh +++ b/test/label-compat.sh @@ -46,7 +46,7 @@ done $NDCTL enable-region $BUS all -len=$($NDCTL list -r 7 -N | jq -r "length") +len=$($NDCTL list -r $region -N | jq -r "length") if [ -z $len ]; then rc=1