Dave Jiang wrote:
> Create security-cxl.sh based off of security.sh for nfit security testing.
> The test will test a cxl_test based security commands enabling through
> nvdimm.
> 
> Signed-off-by: Dave Jiang <[email protected]>
> ---
>  test/common          |    7 +
>  test/meson.build     |    7 +
>  test/security-cxl.sh |  282 
> ++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 296 insertions(+)
>  create mode 100755 test/security-cxl.sh
> 
> diff --git a/test/common b/test/common
> index 65615cc09a3e..e13b79728b0c 100644
> --- a/test/common
> +++ b/test/common
> @@ -47,6 +47,7 @@ fi
>  #
>  NFIT_TEST_BUS0="nfit_test.0"
>  NFIT_TEST_BUS1="nfit_test.1"
> +CXL_TEST_BUS="cxl_test"
>  ACPI_BUS="ACPI.NFIT"
>  E820_BUS="e820"
>  
> @@ -125,6 +126,12 @@ _cleanup()
>       modprobe -r nfit_test
>  }
>  
> +_cxl_cleanup()
> +{
> +     $NDCTL disable-region -b $CXL_TEST_BUS all
> +     modprobe -r cxl_test
> +}
> +
>  # json2var
>  # stdin: json
>  #
> diff --git a/test/meson.build b/test/meson.build
> index 5953c286d13f..485deb89bbe2 100644
> --- a/test/meson.build
> +++ b/test/meson.build
> @@ -219,6 +219,13 @@ if get_option('keyutils').enabled()
>    ]
>  endif
>  
> +if get_option('keyutils').enabled()
> +  security_cxl = find_program('security-cxl.sh')
> +  tests += [
> +    [ 'security-cxl.sh', security_cxl, 'ndctl' ]
> +  ]
> +endif
> +

I had this folded on top for my local testing:

diff --git a/test/meson.build b/test/meson.build
index c9853421ce69..1df115f82fef 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -216,15 +216,10 @@ endif
 
 if get_option('keyutils').enabled()
   security = find_program('security.sh')
-  tests += [
-    [ 'security.sh', security, 'ndctl' ]
-  ]
-endif
-
-if get_option('keyutils').enabled()
   security_cxl = find_program('security-cxl.sh')
   tests += [
-    [ 'security-cxl.sh', security_cxl, 'ndctl' ]
+    [ 'security.sh', security, 'ndctl' ],
+    [ 'security-cxl.sh', security_cxl, 'cxl' ],
   ]
 endif

...although I like Vishal's suggestion to name this cxl-security.sh to
match the other cxl test in the suite.

Reply via email to