summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/mm/uffd-common.h
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2023-04-12 12:45:20 -0400
committerAndrew Morton <akpm@linux-foundation.org>2023-04-18 16:30:08 -0700
commitf9da24263db43da12f1e105cb8ac5e02c66f12d0 (patch)
tree82f4d5ec4810ae924dc189ad04e83c9c19fc5479 /tools/testing/selftests/mm/uffd-common.h
parent4df9cefa9419718c32259c105ac8fbbc680410f7 (diff)
downloadlwn-f9da24263db43da12f1e105cb8ac5e02c66f12d0.tar.gz
lwn-f9da24263db43da12f1e105cb8ac5e02c66f12d0.zip
selftests/mm: allow uffd test to skip properly with no privilege
Allow skip a unit test properly due to no privilege (e.g. sigbus and events tests). [colin.i.king@gmail.com: fix spelling mistake "priviledge" -> "privilege"] Link: https://lkml.kernel.org/r/20230414081506.1678998-1-colin.i.king@gmail.com Link: https://lkml.kernel.org/r/20230412164520.329163-1-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Cc: Axel Rasmussen <axelrasmussen@google.com> Cc: David Hildenbrand <david@redhat.com> Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Mike Rapoport (IBM) <rppt@kernel.org> Cc: Zach O'Keefe <zokeefe@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/testing/selftests/mm/uffd-common.h')
-rw-r--r--tools/testing/selftests/mm/uffd-common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/mm/uffd-common.h b/tools/testing/selftests/mm/uffd-common.h
index 4bd5915cf5b4..32e590ce9442 100644
--- a/tools/testing/selftests/mm/uffd-common.h
+++ b/tools/testing/selftests/mm/uffd-common.h
@@ -101,8 +101,8 @@ extern uffd_test_ops_t hugetlb_uffd_test_ops;
extern uffd_test_ops_t *uffd_test_ops;
void uffd_stats_report(struct uffd_args *args, int n_cpus);
-int uffd_test_ctx_init(uint64_t features);
-void userfaultfd_open(uint64_t *features);
+int uffd_test_ctx_init(uint64_t features, const char **errmsg);
+int userfaultfd_open(uint64_t *features);
int uffd_read_msg(int ufd, struct uffd_msg *msg);
void wp_range(int ufd, __u64 start, __u64 len, bool wp);
void uffd_handle_page_fault(struct uffd_msg *msg, struct uffd_args *args);