cxl: Add support for updated CXL provider name
Dave Jiang
maintainerPATCH 1/1 cxl: Add support for updated CXL provider name
With a 7.1 kernel, the CXL provider name is changed due to removal of the nvdimm_bus_register() wrapper function in cxl_test. This impacts the security unit tests. Update to address the change.
Signed-off-by Dave Jiang <[email protected]>
--- test/common | 6 ++++++ test/cxl-security | 6 +++--- test/security.sh | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-)
test/common +6 -0
@@ -156,3 +156,9 @@ check_dmesg() # CXL COMMON CXL_TEST_QOS_CLASS=42 + +if check_min_kver "7.1"; then + CXL_TEST_PROVIDER="cxl_acpi.0" +else + CXL_TEST_PROVIDER="cxl_test" +fi
test/cxl-security +3 -3
@@ -3,9 +3,9 @@ detect() { - dev="$($NDCTL list -b "$CXL_TEST_BUS" -D | jq -r 'sort_by(.id) | .[0].dev')" + dev="$($NDCTL list -b "$CXL_TEST_PROVIDER" -D | jq -r 'sort_by(.id) | .[0].dev')" [ -n "$dev" ] || err "$LINENO" - id="$($NDCTL list -b "$CXL_TEST_BUS" -D | jq -r 'sort_by(.id) | .[0].id')" + id="$($NDCTL list -b "$CXL_TEST_PROVIDER" -D | jq -r 'sort_by(.id) | .[0].id')" [ -n "$id" ] || err "$LINENO" }
@@ -20,7 +20,7 @@ lock_dimm() test -e "$bus_provider_path" || err "$LINENO" bus_provider=$(cat ${bus_provider_path}) - [[ "$bus_provider" == "$CXL_TEST_BUS" ]] || err "$LINENO" + [[ "$bus_provider" == "$CXL_TEST_PROVIDER" ]] || err "$LINENO" bus="cxl" nmem_provider_path="/sys/bus/nd/devices/${dev}/${bus}/provider" nmem_provider=$(cat ${nmem_provider_path})
test/security.sh +1 -1
@@ -212,7 +212,7 @@ if [ "$1" = "nfit" ]; then KMOD_TEST="nfit_test" elif [ "$1" = "cxl" ]; then . $(dirname $0)/cxl-security - TEST_BUS="$CXL_TEST_BUS" + TEST_BUS="$CXL_TEST_PROVIDER" check_min_kver "6.2" || do_skip "may lack security handling" KMOD_TEST="cxl_test" else
base-commit: 39085f76b6a9d3ac349c3c5dab1cb820c86a293d
Signature · 1 line
2.52.0