Re: [PATCH v2 1/3] selftests/mm: add memory failure anonymous page test
From: Miaohe Lin
Date: Tue Jan 20 2026 - 21:07:52 EST
On 2026/1/21 1:46, Mark Brown wrote:
> On Tue, Jan 20, 2026 at 08:32:37PM +0800, Miaohe Lin wrote:
>
>> +# Try to load hwpoison_inject if not present.
>> +HWPOISON_DIR=/sys/kernel/debug/hwpoison/
>> +if [ ! -d "$HWPOISON_DIR" ]; then
>> + if ! modprobe -q -R hwpoison_inject; then
>> + echo "Module hwpoison_inject not found, skipping..."
>> + else
>> + modprobe hwpoison_inject > /dev/null 2>&1
>> + LOADED_MOD=1
>> + fi
>> +fi
>
> You should also add HWPOISION_INJECT and likely also MEMORY_FAILURE
> (which it depends on) to the config fragment in
>
> tools/testing/selftests/mm/config
Currently if HWPOISION_INJECT or MEMORY_FAILURE isn't enabled, the test
will be skipped.
>
> so people and tools know the config options are needed to get all the
> tests running.
Sounds reasonable. Will add it in next version.
Thanks.
.