Alison Schofield wrote: > The pmem_ns unit test is designed to fallback to using the nfit_test > bus resource when an ACPI resource is not available. That fallback is > not as solid as it could be, causing intermittent failures of the unit > test. > > That nfit_test fallback fails with errors such as: > path: /sys/devices/platform/nfit_test.0/ndbus2/region7/namespace7.0/uuid > libndctl: write_attr: failed to open > /sys/devices/platform/nfit_test.0/ndbus2/region7/namespace7.0/uuid: No such > file or directory > /root/ndctl/build/test/pmem-ns: failed to create PMEM namespace > > This occurs because calling ndctl_test_init() with a NULL context > only unloads and reloads the nfit_test module, but does not invalidate > and reinitialize the libndctl context or its sysfs view from previous > runs. The resulting stale state prevents the test from creating a new > namespace cleanly. > > Replace the NULL context parameter when calling ndctl_test_init() > with the available ndctl_ctx to ensure pmem_ns can find usable PMEM > regions. > > Add more debug messaging to describe why the nfit_test fallback path > is taken, ie NULL bus or NULL region. > > > Reported-by: Marc Herbert <[email protected]> > Reviewed-by: Dave Jiang <[email protected]>
Reviewed-by: Ira Weiny <[email protected]> [snip]
