The quilt patch titled Subject: userfaultfd: selftests: modify selftest to use /dev/userfaultfd has been removed from the -mm tree. Its filename was userfaultfd-selftests-modify-selftest-to-use-dev-userfaultfd-v7.patch This patch was dropped because it was folded into userfaultfd-selftests-modify-selftest-to-use-dev-userfaultfd.patch ------------------------------------------------------ From: Axel Rasmussen <axelrasmussen@xxxxxxxxxx> Subject: userfaultfd: selftests: modify selftest to use /dev/userfaultfd Date: Fri, 19 Aug 2022 13:51:59 -0700 modify selftest to exit with KSFT_SKIP *only* when features are unsupported, exiting with 1 in other error cases, per Mike Link: https://lkml.kernel.org/r/20220819205201.658693-4-axelrasmussen@xxxxxxxxxx Signed-off-by: Axel Rasmussen <axelrasmussen@xxxxxxxxxx> Acked-by: Mike Rapoport <rppt@xxxxxxxxxxxxx> Acked-by: Peter Xu <peterx@xxxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> Cc: Dmitry V. Levin <ldv@xxxxxxxxxxxx> Cc: Gleb Fotengauer-Malinovskiy <glebfm@xxxxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Cc: Mike Rapoport <rppt@xxxxxxxxxx> Cc: Nadav Amit <namit@xxxxxxxxxx> Cc: Shuah Khan <shuah@xxxxxxxxxx> Cc: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Zhang Yi <yi.zhang@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/vm/userfaultfd.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) --- a/tools/testing/selftests/vm/userfaultfd.c~userfaultfd-selftests-modify-selftest-to-use-dev-userfaultfd-v7 +++ a/tools/testing/selftests/vm/userfaultfd.c @@ -402,13 +402,16 @@ static void assert_expected_ioctls_prese static int __userfaultfd_open_dev(void) { - int fd, _uffd = -1; + int fd, _uffd; fd = open("/dev/userfaultfd", O_RDWR | O_CLOEXEC); if (fd < 0) - return -1; + errexit(KSFT_SKIP, "opening /dev/userfaultfd failed"); _uffd = ioctl(fd, USERFAULTFD_IOC_NEW, UFFD_FLAGS); + if (_uffd < 0) + errexit(errno == ENOTTY ? KSFT_SKIP : 1, + "creating userfaultfd failed"); close(fd); return _uffd; } @@ -419,10 +422,12 @@ static void userfaultfd_open(uint64_t *f if (test_dev_userfaultfd) uffd = __userfaultfd_open_dev(); - else + else { uffd = syscall(__NR_userfaultfd, UFFD_FLAGS); - if (uffd < 0) - errexit(KSFT_SKIP, "creating userfaultfd failed"); + if (uffd < 0) + errexit(errno == ENOSYS ? KSFT_SKIP : 1, + "creating userfaultfd failed"); + } uffd_flags = fcntl(uffd, F_GETFD, NULL); uffdio_api.api = UFFD_API; _ Patches currently in -mm which might be from axelrasmussen@xxxxxxxxxx are selftests-vm-add-hugetlb_shared-userfaultfd-test-to-run_vmtestssh.patch userfaultfd-add-dev-userfaultfd-for-fine-grained-access-control.patch userfaultfd-selftests-modify-selftest-to-use-dev-userfaultfd.patch userfaultfd-update-documentation-to-describe-dev-userfaultfd.patch userfaultfd-update-documentation-to-describe-dev-userfaultfd-v7.patch selftests-vm-add-dev-userfaultfd-test-cases-to-run_vmtestssh.patch kselftests-removing-support-of-libhugetlbfs-from-kselftests-fix.patch