Skip to contentSkip to conversation

test/cxl-destroy-region.sh: create RAM regions explicitly

PATCH Applied Alison Schofield 3 participants 4 messages Nov 6 libnvdimm: non-volatile memory device

lore
Share & tools
lore

Alison Schofield

author maintainer
#0 lore raw

PATCH 1/1 test/cxl-destroy-region.sh: create RAM regions explicitly

The test creates regions it expects to be RAM without passing a type. create-region defaults to pmem when the root decoder supports both RAM and PMEM, so the test fails when it picks such a decoder.

cxl_test has one such decoder. Whether the test picks it depends on the memdev order, which changes when other CXL devices, such as QEMU-emulated ones, are present.

Use the '-t ram' option so both checks create RAM regions regardless of which decoder is selected.

This issue appeared while the CXL kernel patch[1] was being tested. It changes the cxl_test created x1 volatile window to one that support both RAM and PMEM.

[1] https://lore.kernel.org/linux-cxl/89e8d2cfde4f1054f37a4f48f2b206a7f05108f7.1793850480.git.alison.schofield@intel.com/

---
 test/cxl-destroy-region.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
test/cxl-destroy-region.sh +2 -2
index 5c3395e530b0..b07589fbbe39 100644
@@ -60,7 +60,7 @@ check_destroy_ram()
 	mem=$1
 	decoder=$2
 
-	region="$("$CXL" create-region -d "$decoder" -m "$mem" | jq -r ".region")"
+	region="$("$CXL" create-region -t ram -d "$decoder" -m "$mem" | jq -r ".region")"
 	if [[ ! $region ]]; then
 		err "$LINENO"
 	fi
@@ -76,7 +76,7 @@ check_destroy_devdax()
 	mem=$1
 	decoder=$2
 
-	region="$("$CXL" create-region -d "$decoder" -m "$mem" | jq -r ".region")"
+	region="$("$CXL" create-region -t ram -d "$decoder" -m "$mem" | jq -r ".region")"
 	if [[ ! $region ]]; then
 		err "$LINENO"
 	fi
Signature · 1 line
2.37.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Alison Schofield

The test creates regions it expects to be RAM without passing a type. create-region defaults to pmem when the root decoder supports both RAM and PMEM, so the test fails when it picks such a decoder.

cxl_test has one such decoder. Whether the test picks it depends on the memdev order, which changes when other CXL devices, such as QEMU-emulated ones, are present.

Use the '-t ram' option so both checks create RAM regions regardless of which decoder is selected.

This issue appeared while the CXL kernel patch[1] was being tested. It changes the cxl_test created x1 volatile window to one that support both RAM and PMEM.

Quoted 5 lines

[1] https://lore.kernel.org/linux-cxl/89e8d2cfde4f1054f37a4f48f2b206a7f05108f7.1793850480.git.alison.schofield@intel.com/

Quoted 26 lines
---
  test/cxl-destroy-region.sh | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
test/cxl-destroy-region.sh +2 -2
index 5c3395e530b0..b07589fbbe39 100644
@@ -60,7 +60,7 @@ check_destroy_ram()
  	mem=$1
  	decoder=$2
 
-	region="$("$CXL" create-region -d "$decoder" -m "$mem" | jq -r ".region")"
+	region="$("$CXL" create-region -t ram -d "$decoder" -m "$mem" | jq -r ".region")"
  	if [[ ! $region ]]; then
  		err "$LINENO"
  	fi
@@ -76,7 +76,7 @@ check_destroy_devdax()
  	mem=$1
  	decoder=$2
 
-	region="$("$CXL" create-region -d "$decoder" -m "$mem" | jq -r ".region")"
+	region="$("$CXL" create-region -t ram -d "$decoder" -m "$mem" | jq -r ".region")"
  	if [[ ! $region ]]; then
  		err "$LINENO"
  	fi
maintainer Reviewed-by Tested-by on v1 1/1
#2 lore raw
In reply to Alison Schofield
Quoted 15 lines · Alison Schofield

The test creates regions it expects to be RAM without passing a type. create-region defaults to pmem when the root decoder supports both RAM and PMEM, so the test fails when it picks such a decoder.

cxl_test has one such decoder. Whether the test picks it depends on the memdev order, which changes when other CXL devices, such as QEMU-emulated ones, are present.

Use the '-t ram' option so both checks create RAM regions regardless of which decoder is selected.

This issue appeared while the CXL kernel patch[1] was being tested. It changes the cxl_test created x1 volatile window to one that support both RAM and PMEM.

Quoted 5 lines

[1] https://lore.kernel.org/linux-cxl/89e8d2cfde4f1054f37a4f48f2b206a7f05108f7.1793850480.git.alison.schofield@intel.com/

Quoted 26 lines
---
 test/cxl-destroy-region.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
test/cxl-destroy-region.sh +2 -2
index 5c3395e530b0..b07589fbbe39 100644
@@ -60,7 +60,7 @@ check_destroy_ram()
 	mem=$1
 	decoder=$2
 
-	region="$("$CXL" create-region -d "$decoder" -m "$mem" | jq -r ".region")"
+	region="$("$CXL" create-region -t ram -d "$decoder" -m "$mem" | jq -r ".region")"
 	if [[ ! $region ]]; then
 		err "$LINENO"
 	fi
@@ -76,7 +76,7 @@ check_destroy_devdax()
 	mem=$1
 	decoder=$2
 
-	region="$("$CXL" create-region -d "$decoder" -m "$mem" | jq -r ".region")"
+	region="$("$CXL" create-region -t ram -d "$decoder" -m "$mem" | jq -r ".region")"
 	if [[ ! $region ]]; then
 		err "$LINENO"
 	fi
author maintainer Applied
#3 lore raw
In reply to Alison Schofield
Quoted 15 lines · Alison Schofield

The test creates regions it expects to be RAM without passing a type. create-region defaults to pmem when the root decoder supports both RAM and PMEM, so the test fails when it picks such a decoder.

cxl_test has one such decoder. Whether the test picks it depends on the memdev order, which changes when other CXL devices, such as QEMU-emulated ones, are present.

Use the '-t ram' option so both checks create RAM regions regardless of which decoder is selected.

This issue appeared while the CXL kernel patch[1] was being tested. It changes the cxl_test created x1 volatile window to one that support both RAM and PMEM.

Quoted 5 lines

[1] https://lore.kernel.org/linux-cxl/89e8d2cfde4f1054f37a4f48f2b206a7f05108f7.1793850480.git.alison.schofield@intel.com/

Applied
https://github.com/pmem/ndctl/tree/pending