diff mbox series

[ndctl] test/cxl-xor-region.sh: skip instead of fail for missing cxl_test

Message ID 20230112-vv-xor-test-skip-v1-1-92ddc619ba6c@intel.com
State Accepted
Commit 08720628d2ba469e203a18c0b1ffbd90f4bfab1d
Headers show
Series [ndctl] test/cxl-xor-region.sh: skip instead of fail for missing cxl_test | expand

Commit Message

Verma, Vishal L Jan. 13, 2023, 5:16 p.m. UTC
Fix cxl-xor-region.sh to correctly skip if cxl_test is unavailable by
returning the special code '77' if the modprobe fails.

Link: https://github.com/pmem/ndctl/issues/229
Fixes: 05486f8bf154 ("cxl/test: add cxl_xor_region test")
Cc: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 test/cxl-xor-region.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


---
base-commit: b73e4e0390aae822bc91b8bf72430e6f0e84d668
change-id: 20230112-vv-xor-test-skip-3ae4f5d065e4

Best regards,

Comments

Alison Schofield Jan. 13, 2023, 5:56 p.m. UTC | #1
On Fri, Jan 13, 2023 at 10:16:21AM -0700, Vishal Verma wrote:
> Fix cxl-xor-region.sh to correctly skip if cxl_test is unavailable by
> returning the special code '77' if the modprobe fails.

Thanks Vishal!

Reviewed-by: Alison Schofield <alison.schofield@intel.com>

> 
> Link: https://github.com/pmem/ndctl/issues/229
> Fixes: 05486f8bf154 ("cxl/test: add cxl_xor_region test")
> Cc: Alison Schofield <alison.schofield@intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> ---
>  test/cxl-xor-region.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/test/cxl-xor-region.sh b/test/cxl-xor-region.sh
> index 5c2108c..1962327 100644
> --- a/test/cxl-xor-region.sh
> +++ b/test/cxl-xor-region.sh
> @@ -4,7 +4,7 @@
>  
>  . $(dirname $0)/common
>  
> -rc=1
> +rc=77
>  
>  set -ex
>  
> @@ -15,6 +15,7 @@ check_prereq "jq"
>  modprobe -r cxl_test
>  modprobe cxl_test interleave_arithmetic=1
>  udevadm settle
> +rc=1
>  
>  # THEORY OF OPERATION: Create x1,2,3,4 regions to exercise the XOR math
>  # option of the CXL driver. As with other cxl_test tests, changes to the
> 
> ---
> base-commit: b73e4e0390aae822bc91b8bf72430e6f0e84d668
> change-id: 20230112-vv-xor-test-skip-3ae4f5d065e4
> 
> Best regards,
> -- 
> Vishal Verma <vishal.l.verma@intel.com>
>
diff mbox series

Patch

diff --git a/test/cxl-xor-region.sh b/test/cxl-xor-region.sh
index 5c2108c..1962327 100644
--- a/test/cxl-xor-region.sh
+++ b/test/cxl-xor-region.sh
@@ -4,7 +4,7 @@ 
 
 . $(dirname $0)/common
 
-rc=1
+rc=77
 
 set -ex
 
@@ -15,6 +15,7 @@  check_prereq "jq"
 modprobe -r cxl_test
 modprobe cxl_test interleave_arithmetic=1
 udevadm settle
+rc=1
 
 # THEORY OF OPERATION: Create x1,2,3,4 regions to exercise the XOR math
 # option of the CXL driver. As with other cxl_test tests, changes to the