* + userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined.patch added to -mm tree
@ 2015-09-15 20:04 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2015-09-15 20:04 UTC (permalink / raw)
To: mpe, aarcange, dgilbert, shuahkh, treding, mm-commits
The patch titled
Subject: userfaultfd: selftest: only warn if __NR_userfaultfd is undefined
has been added to the -mm tree. Its filename is
userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Michael Ellerman <mpe@ellerman.id.au>
Subject: userfaultfd: selftest: only warn if __NR_userfaultfd is undefined
If __NR_userfaultfd is not yet defined by the arch, warn but still
build and run the userfaultfd selftest successfully.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
tools/testing/selftests/vm/userfaultfd.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff -puN tools/testing/selftests/vm/userfaultfd.c~userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined tools/testing/selftests/vm/userfaultfd.c
--- a/tools/testing/selftests/vm/userfaultfd.c~userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined
+++ a/tools/testing/selftests/vm/userfaultfd.c
@@ -66,9 +66,7 @@
#include <pthread.h>
#include <linux/userfaultfd.h>
-#ifndef __NR_userfaultfd
-#error "missing __NR_userfaultfd definition"
-#endif
+#ifdef __NR_userfaultfd
static unsigned long nr_cpus, nr_pages, nr_pages_per_cpu, page_size;
@@ -631,3 +629,15 @@ int main(int argc, char **argv)
nr_pages, nr_pages_per_cpu);
return userfaultfd_stress();
}
+
+#else /* __NR_userfaultfd */
+
+#warning "missing __NR_userfaultfd definition"
+
+int main(void)
+{
+ printf("skip: Skipping userfaultfd test (missing __NR_userfaultfd)\n");
+ return 0;
+}
+
+#endif /* __NR_userfaultfd */
_
Patches currently in -mm which might be from mpe@ellerman.id.au are
userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-15 20:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-15 20:04 + userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.