On 2026-10-21 19:34 -0700, Alison Schofield wrote:
> On Fri, Oct 16, 2026 at 05:42:48PM -0400, Gregory Price (Meta) wrote:
> > From: Gregory Price <[email protected]>
> > 
> > Repeat the online/offline pair to cover onlining from 'unplugged', and
> > check that offline-memory unplugs an already offline device. After each
> > step, check block counts and, where present, daxX.Y/state and the
> > 'hotplug_state' reported by 'daxctl list'.
> 
> Hi Greg,
> 
> Please change how the tests handle the absence of the new sysfs attribute.
> If a test expects the new interface, a missing attribute should cause
> the test to fail, with a clear error message. We have had problems in
> the past with tests silently not executing letting defects go undetected.
> 

ack

> Note that we don't require backward compatibility for the unit tests.
> The utilities must continue working with older kernels, but tests for new
> functionality should fail loudly when that functionality is missing.
> (I'm aware that not all tests follow that guideline, and they need fixing.)
> 

this is slightly confusing, but noted.  I would have expected the tests
to test backward compatibility.  But ack.

> Please also leave the existing test cases as they were and run the new
> state-dependent cases last.
> 

ack.

> A few stale state cases would exercise daxctl behavior that the kernel
> selftest can't cover - 
> 
>   - Offline one memory block out-of-band, verify that daxctl list
>     reports hotplug_state "inconsistent", then verify that
>     offline-memory still leaves the device unplugged with its blocks
>     removed.
> 
>   - Offline all blocks out-of-band, then verify that
>     "reconfigure-device -m devdax" succeeds and the blocks are removed.
> 
>   - With all blocks offline but the device state still reporting
>     online, verify that online-memory falls back to the per-block path
>     and brings everything online.
> 

good idea.

> For "blocks removed", please check that the device's memory blocks
> are gone from /sys/devices/system/memory.  ie verify in sysfs directly
> independent of the libdaxctl code being tested.
> 

ack

> About multi-range devices-
> 
> I found that libdaxctl undercounts memory blocks on multi-range devices.
> I'm posting a separate fix and test for that. Nothing in this series needs
> to change. I'll cc you for review.
> 

ack

> Our ndctl emulation can't exercise multi-range hotplug, but the kernel
> selftest can run against a real multi-range device. Could you add coverage
> there, including the partial-add case where the kernel reports success
> even though not all ranges were added?
> 

ack.

Thanks Alison!

-- 
~Gregory


Reply via email to