From patchwork Wed Dec 13 08:25:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhijian Li (Fujitsu)" X-Patchwork-Id: 13490533 Received: from esa7.hc1455-7.c3s2.iphmx.com (esa7.hc1455-7.c3s2.iphmx.com [139.138.61.252]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1FC9F2 for ; Wed, 13 Dec 2023 00:26:10 -0800 (PST) X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="121884037" X-IronPort-AV: E=Sophos;i="6.04,272,1695654000"; d="scan'208";a="121884037" Received: from unknown (HELO oym-r1.gw.nic.fujitsu.com) ([210.162.30.89]) by esa7.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 17:26:05 +0900 Received: from oym-m2.gw.nic.fujitsu.com (oym-nat-oym-m2.gw.nic.fujitsu.com [192.168.87.59]) by oym-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id C6F89D2B51 for ; Wed, 13 Dec 2023 17:26:03 +0900 (JST) Received: from kws-ab3.gw.nic.fujitsu.com (kws-ab3.gw.nic.fujitsu.com [192.51.206.21]) by oym-m2.gw.nic.fujitsu.com (Postfix) with ESMTP id 05451BF4A1 for ; Wed, 13 Dec 2023 17:26:03 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab3.gw.nic.fujitsu.com (Postfix) with ESMTP id 983B3202D4B6D for ; Wed, 13 Dec 2023 17:26:02 +0900 (JST) Received: from FNSTPC.g08.fujitsu.local (unknown [10.167.226.45]) by edo.cn.fujitsu.com (Postfix) with ESMTP id 275021A0074; Wed, 13 Dec 2023 16:26:02 +0800 (CST) From: Li Zhijian To: nvdimm@lists.linux.dev Cc: linux-cxl@vger.kernel.org, Dan Williams , Alison Schofield , Li Zhijian Subject: [ndctl PATCH v3 2/2] test/cxl-region-sysfs.sh: Fix cxl-region-sysfs.sh: line 107: [: missing `]' Date: Wed, 13 Dec 2023 16:25:56 +0800 Message-ID: <20231213082556.1401741-2-lizhijian@fujitsu.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231213082556.1401741-1-lizhijian@fujitsu.com> References: <20231213082556.1401741-1-lizhijian@fujitsu.com> Precedence: bulk X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28054.005 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28054.005 X-TMASE-Result: 10--12.942100-10.000000 X-TMASE-MatchedRID: k/L/ofNtQd05rof3b4z0VFhRyidsElYkLL6mJOIs/vZ4YeSlHZYFonNZ 68PxzmeRdeMDTgepT/+OtOlauyE0EKPDXg0LeBewEXjPIvKd74BMkOX0UoduuZyka59saICoWFC ZbvPiXUVz/vZoWw477XegIXkiA/apHxPMjOKY7A/+HHE8LDNSg8RB0bsfrpPIfiAqrjYtFiSmyT u8BALsYNYqCJn+NGph+1h/I5+Pvo9jbs4248fyen7cGd19dSFd X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 Currently the cxl-region-sysfs.sh test runs to completion and passes, but with syntax errors in the log. It turns out that because the test is checking for a positive condition as a failure, that also happens to mask the syntax errors. Fix the syntax and note that this also happens to unblock a test case that was being hidden by this error. Signed-off-by: Li Zhijian --- V3: update changelog per Dan's comments --- test/cxl-region-sysfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cxl-region-sysfs.sh b/test/cxl-region-sysfs.sh index 6a5da6d..db1a163 100644 --- a/test/cxl-region-sysfs.sh +++ b/test/cxl-region-sysfs.sh @@ -104,7 +104,7 @@ do iw=$(cat /sys/bus/cxl/devices/$i/interleave_ways) ig=$(cat /sys/bus/cxl/devices/$i/interleave_granularity) [ $iw -ne $nr_targets ] && err "$LINENO: decoder: $i iw: $iw targets: $nr_targets" - [ $ig -ne $r_ig] && err "$LINENO: decoder: $i ig: $ig root ig: $r_ig" + [ $ig -ne $r_ig ] && err "$LINENO: decoder: $i ig: $ig root ig: $r_ig" sz=$(cat /sys/bus/cxl/devices/$i/size) res=$(cat /sys/bus/cxl/devices/$i/start)