All of lore.kernel.org
 help / color / mirror / Atom feed
* [ndctl PATCH] test/cxl-destroy-region.sh: create RAM regions explicitly
@ 2026-11-06  1:48 Alison Schofield
  2026-11-06  5:37 ` Li Ming
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alison Schofield @ 2026-11-06  1:48 UTC (permalink / raw)
  To: nvdimm; +Cc: Alison Schofield, linux-cxl, Dave Jiang

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/


Reported-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
---
 test/cxl-destroy-region.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/cxl-destroy-region.sh b/test/cxl-destroy-region.sh
index 5c3395e530b0..b07589fbbe39 100644
--- a/test/cxl-destroy-region.sh
+++ b/test/cxl-destroy-region.sh
@@ -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
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [ndctl PATCH] test/cxl-destroy-region.sh: create RAM regions explicitly
  2026-11-06  1:48 [ndctl PATCH] test/cxl-destroy-region.sh: create RAM regions explicitly Alison Schofield
@ 2026-11-06  5:37 ` Li Ming
  2026-11-06 15:11 ` Dave Jiang
  2026-11-06 17:47 ` Alison Schofield
  2 siblings, 0 replies; 4+ messages in thread
From: Li Ming @ 2026-11-06  5:37 UTC (permalink / raw)
  To: linux-cxl


在 2026/11/6 09:48, 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.
>
> [1] https://lore.kernel.org/linux-cxl/89e8d2cfde4f1054f37a4f48f2b206a7f05108f7.1793850480.git.alison.schofield@intel.com/
>
>
> Reported-by: Dave Jiang <dave.jiang@intel.com>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>

> ---
>   test/cxl-destroy-region.sh | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/test/cxl-destroy-region.sh b/test/cxl-destroy-region.sh
> index 5c3395e530b0..b07589fbbe39 100644
> --- a/test/cxl-destroy-region.sh
> +++ b/test/cxl-destroy-region.sh
> @@ -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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ndctl PATCH] test/cxl-destroy-region.sh: create RAM regions explicitly
  2026-11-06  1:48 [ndctl PATCH] test/cxl-destroy-region.sh: create RAM regions explicitly Alison Schofield
  2026-11-06  5:37 ` Li Ming
@ 2026-11-06 15:11 ` Dave Jiang
  2026-11-06 17:47 ` Alison Schofield
  2 siblings, 0 replies; 4+ messages in thread
From: Dave Jiang @ 2026-11-06 15:11 UTC (permalink / raw)
  To: Alison Schofield, nvdimm; +Cc: linux-cxl



On 11/5/26 6:48 PM, Alison Schofield wrote:
> 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/
> 
> 
> Reported-by: Dave Jiang <dave.jiang@intel.com>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Tested-by: Dave Jiang <dave.jiang@intel.com>

> ---
>  test/cxl-destroy-region.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/test/cxl-destroy-region.sh b/test/cxl-destroy-region.sh
> index 5c3395e530b0..b07589fbbe39 100644
> --- a/test/cxl-destroy-region.sh
> +++ b/test/cxl-destroy-region.sh
> @@ -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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ndctl PATCH] test/cxl-destroy-region.sh: create RAM regions explicitly
  2026-11-06  1:48 [ndctl PATCH] test/cxl-destroy-region.sh: create RAM regions explicitly Alison Schofield
  2026-11-06  5:37 ` Li Ming
  2026-11-06 15:11 ` Dave Jiang
@ 2026-11-06 17:47 ` Alison Schofield
  2 siblings, 0 replies; 4+ messages in thread
From: Alison Schofield @ 2026-11-06 17:47 UTC (permalink / raw)
  To: nvdimm; +Cc: linux-cxl, Dave Jiang

On Thu, Nov 05, 2026 at 05:48:46PM -0800, Alison Schofield wrote:
> 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/
> 
> 
> Reported-by: Dave Jiang <dave.jiang@intel.com>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-06 17:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06  1:48 [ndctl PATCH] test/cxl-destroy-region.sh: create RAM regions explicitly Alison Schofield
2026-11-06  5:37 ` Li Ming
2026-11-06 15:11 ` Dave Jiang
2026-11-06 17:47 ` Alison Schofield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.