diff mbox

[ndctl] test, label-compat.sh: fix region determination

Message ID 149367954530.14481.331986452118782394.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State Accepted
Commit 69b5e572b8d3
Headers show

Commit Message

Dan Williams May 1, 2017, 10:59 p.m. UTC
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 <dan.j.williams@intel.com>
---
 test/label-compat.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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