Re: [PATCH] cxl/port: Fix cxl_test register enumeration regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 9/15/2023 1:07 AM, Dan Williams wrote:
> The cxl_test unit test environment models a CXL topology for
> sysfs/user-ABI regression testing. It uses interface mocking via the
> "--wrap=" linker option to redirect cxl_core routines that parse
> hardware registers with versions that just publish objects, like
> devm_cxl_enumerate_decoders().
>
> Starting with:
>
> Commit 19ab69a60e3b ("cxl/port: Store the port's Component Register mappings in struct cxl_port")
>
> ...port register enumeration is moved into devm_cxl_add_port(). This
> conflicts with the "cxl_test avoids emulating registers stance" so
> either the port code needs to be refactored (too violent), or modified
> so that register enumeration is skipped on "fake" cxl_test ports
> (annoying, but straightforward).
>
> This conflict has happened previously and the "check for platform
> device" workaround to avoid instrusive refactoring was deployed in those
> scenarios. In general, refactoring should only benefit production code,
> test code needs to remain minimally instrusive to the greatest extent
> possible.
>
> This was missed previously because it may sometimes just cause warning
> messages to be emitted, but it can also cause test failures. The
> backport to -stable is only nice to have for clean cxl_test runs.
>
> Fixes: 19ab69a60e3b ("cxl/port: Store the port's Component Register mappings in struct cxl_port")
> Cc: <stable@xxxxxxxxxxxxxxx>
> Reported-by: Alison Schofield <alison.schofield@xxxxxxxxx>
> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
>
This patch has already hit upstream, but I'd like to report
this also fixed a 100% reproducible issue just loading
cxl_test modules in a Parallels ARM VM on a MacBook Pro.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux