userfaultfd/selftests: always dump something in modes
authorPeter Xu <peterx@redhat.com>
Tue, 15 Dec 2020 03:14:02 +0000 (19:14 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2020 20:13:46 +0000 (12:13 -0800)
Patch series "userfaultfd: selftests: Small fixes".

Some very trivial fixes that I kept locally to userfaultfd selftest
program.

This patch (of 3):

BOUNCE_POLL is a special bit that if cleared it means "READ" instead.
Dump that too otherwise we'll see tests with empty modes.

Link: https://lkml.kernel.org/r/20201208024709.7701-1-peterx@redhat.com
Link: https://lkml.kernel.org/r/20201208024709.7701-2-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/vm/userfaultfd.c

index a7059a6bc215ee36cb9fd254d37293a3e0e7839b..7fc1eaf4ceaa92fd6f4dd21ac3b39be02c55cb8e 100644 (file)
@@ -1291,6 +1291,8 @@ static int userfaultfd_stress(void)
                        printf(" ver");
                if (bounces & BOUNCE_POLL)
                        printf(" poll");
+               else
+                       printf(" read");
                printf(", ");
                fflush(stdout);