summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/mm/uffd-common.h
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2023-04-12 19:43:31 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-04-19 02:30:05 +0300
commitc5cb903646f4df0ab3760dcb2e5571b528b6db59 (patch)
tree75c723a4347cffd5ad0d5c8220bccead103ea759 /tools/testing/selftests/mm/uffd-common.h
parentd5433ce84d2572d43a3c58e5cab21db200669bfd (diff)
downloadlinux-c5cb903646f4df0ab3760dcb2e5571b528b6db59.tar.xz
selftests/mm: drop global mem_fd in uffd tests
Drop it by creating the memfd dynamically in the tests. Link: https://lkml.kernel.org/r/20230412164331.328584-1-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> 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: 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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/mm/uffd-common.h b/tools/testing/selftests/mm/uffd-common.h
index 11f770391bd9..0dfab7057295 100644
--- a/tools/testing/selftests/mm/uffd-common.h
+++ b/tools/testing/selftests/mm/uffd-common.h
@@ -87,7 +87,7 @@ typedef struct uffd_test_ops uffd_test_ops_t;
extern unsigned long nr_cpus, nr_pages, nr_pages_per_cpu, page_size, hpage_size;
extern char *area_src, *area_src_alias, *area_dst, *area_dst_alias, *area_remap;
-extern int mem_fd, uffd, uffd_flags, finished, *pipefd, test_type;
+extern int uffd, uffd_flags, finished, *pipefd, test_type;
extern bool map_shared, test_collapse, test_dev_userfaultfd;
extern bool test_uffdio_wp, test_uffdio_minor;
extern unsigned long long *count_verify;