Re: [PATCH v2 1/3] selftests/mm: add memory failure anonymous page test

From: Mark Brown

Date: Tue Jan 20 2026 - 12:46:26 EST


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

so people and tools know the config options are needed to get all the
tests running.

Attachment: signature.asc
Description: PGP signature