| From: Li Wang <liwang@redhat.com> |
| Subject: selftests/mm: fix UFFDIO_API usage with proper two-step feature negotiation |
| Date: Wed, 25 Jun 2025 08:46:45 +0800 |
| |
| fail the test if sys_userfaultfd() fails, per David |
| |
| Link: https://lkml.kernel.org/r/20250625004645.400520-1-liwang@redhat.com |
| Signed-off-by: Li Wang <liwang@redhat.com> |
| Suggested-by: David Hildenbrand <david@redhat.com> |
| Acked-by: David Hildenbrand <david@redhat.com> |
| Cc: Peter Xu <peterx@redhat.com> |
| Cc: Nadav Amit <nadav.amit@gmail.com> |
| Cc: Aruna Ramakrishna <aruna.ramakrishna@oracle.com> |
| Cc: Bagas Sanjaya <bagasdotme@gmail.com> |
| Cc: Catalin Marinas <catalin.marinas@arm.com> |
| Cc: Dave Hansen <dave.hansen@linux.intel.com> |
| Cc: Joey Gouly <joey.gouly@arm.com> |
| Cc: Johannes Weiner <hannes@cmpxchg.org> |
| Cc: Keith Lucas <keith.lucas@oracle.com> |
| Cc: Ryan Roberts <ryan.roberts@arm.com> |
| Cc: Shuah Khan <shuah@kernel.org> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| tools/testing/selftests/mm/ksm_functional_tests.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/tools/testing/selftests/mm/ksm_functional_tests.c~selftests-mm-fix-uffdio_api-usage-with-proper-two-step-feature-negotiation-v3 |
| +++ a/tools/testing/selftests/mm/ksm_functional_tests.c |
| @@ -415,7 +415,7 @@ static void test_unmerge_uffd_wp(void) |
| close(uffd); |
| uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK); |
| if (uffd < 0) { |
| - ksft_test_result_skip("__NR_userfaultfd failed\n"); |
| + ksft_test_result_fail("__NR_userfaultfd failed\n"); |
| goto unmap; |
| } |
| |
| _ |