On Thu, May 14, 2026 at 05:12:03PM -0700, Dave Jiang wrote:
> CXL type2 hierachy can be setup via the cxl_test. Add a regression test
hierarchy

> unit to CXL CLI to verify the type2 loading/unloading. Test include
Tests

> removing the root port and bringing it back, unbinding the type2 mock
> device driver and bringing it back, and checking to see if a region
> can be destroyed and a memdev can be disabled.
> 

Hi Dave,
FWIW I tested this v2 using v1 of the kernel cxl-test patchset.
Doubtful, but possible, I may have more comments when I sync
up with v2 of the kernel set.


snip
> +
> +init_check() {
> +     load_kmod
> +     [ -f /sys/module/cxl_test/parameters/type2_test ] || \
> +             do_skip "cxl_test type2_test module param not available"
> +     region=$("$CXL" list -b "$CXL_TEST_BUS" -R | jq -r '.[0].region')
> +     [ -n "$region" ] || err "$LINENO"

This needs the //empty treatment so that if the cxl-test module doesn't
provide the autoregion upon load, we fail right here.

It looks like //empty is used to verify removal or disappearance
cases, but not in the positive discovery checks where we depend
on cxl-test topology to provide a valid object. Everywhere that
jq result is treated as a shell string testing for existence,
it needs the check. That keeps the failure messages 'on point'.

snip

Reply via email to