summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorBrendan Jackman <jackmanb@google.com>2025-03-11 16:18:13 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-03-17 08:06:37 +0300
commit0046dbed80e67f57014bdfdcabd7a8ae5e73824a (patch)
tree9ebdf4dc7af5e90005ded4eeeb6f6c4be1f4c4aa /tools/testing
parent800ddf3cd74bda8061105cab7cc169b9a2667f44 (diff)
downloadlinux-0046dbed80e67f57014bdfdcabd7a8ae5e73824a.tar.xz
selftests/mm: skip uffd-stress if userfaultfd not available
It's pretty obvious that the test wouldn't work if you don't have the feature enabled. But, it's still useful to SKIP instead of failing so the reader can immediately tell that this is the reason why. Link: https://lkml.kernel.org/r/20250311-mm-selftests-v4-2-dec210a658f5@google.com Signed-off-by: Brendan Jackman <jackmanb@google.com> Reviewed-by: Dev Jain <dev.jain@arm.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Mateusz Guzik <mjguzik@gmail.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/mm/uffd-stress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c
index 944d559ade21..91174e9425cd 100644
--- a/tools/testing/selftests/mm/uffd-stress.c
+++ b/tools/testing/selftests/mm/uffd-stress.c
@@ -412,8 +412,8 @@ static void parse_test_type_arg(const char *raw_type)
* feature.
*/
- if (uffd_get_features(&features))
- err("failed to get available features");
+ if (uffd_get_features(&features) && errno == ENOENT)
+ ksft_exit_skip("failed to get available features (%d)\n", errno);
test_uffdio_wp = test_uffdio_wp &&
(features & UFFD_FEATURE_PAGEFAULT_FLAG_WP);