]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled
authorLance Yang <lance.yang@linux.dev>
Wed, 17 Sep 2025 13:31:37 +0000 (21:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 14:23:21 +0000 (16:23 +0200)
commitf734944e12b2e0abe11b37deeea881febb81d383
tree58134319d4c93620066dedb1757b6e54cfb841cd
parentf4ca54bb9733049d2ffd158923f44ab6d934a382
selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled

commit 0389c305ef56cbadca4cbef44affc0ec3213ed30 upstream.

The madv_populate and soft-dirty kselftests currently fail on systems
where CONFIG_MEM_SOFT_DIRTY is disabled.

Introduce a new helper softdirty_supported() into vm_util.c/h to ensure
tests are properly skipped when the feature is not enabled.

Link: https://lkml.kernel.org/r/20250917133137.62802-1-lance.yang@linux.dev
Fixes: 9f3265db6ae8 ("selftests: vm: add test for Soft-Dirty PTE bit")
Signed-off-by: Lance Yang <lance.yang@linux.dev>
Acked-by: David Hildenbrand <david@redhat.com>
Suggested-by: David Hildenbrand <david@redhat.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/vm/madv_populate.c
tools/testing/selftests/vm/soft-dirty.c
tools/testing/selftests/vm/vm_util.c
tools/testing/selftests/vm/vm_util.h