]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 23 Sep 2025 21:14:16 +0000 (14:14 -0700)
commit0389c305ef56cbadca4cbef44affc0ec3213ed30
tree07a0ecd496a07c009a415fbf7763877d71b231aa
parent8d009da32f13759ee7a6ec002ba62dc8faeb6423
selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled

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>
tools/testing/selftests/mm/madv_populate.c
tools/testing/selftests/mm/soft-dirty.c
tools/testing/selftests/mm/vm_util.c
tools/testing/selftests/mm/vm_util.h