diff mbox series

[182/200] userfaultfd/selftests: always dump something in modes

Message ID 20201215031402.8uJvm2D5f%akpm@linux-foundation.org (mailing list archive)
State New, archived
Headers show
Series [001/200] kthread: add kthread_work tracepoints | expand

Commit Message

Andrew Morton Dec. 15, 2020, 3:14 a.m. UTC
From: Peter Xu <peterx@redhat.com>
Subject: userfaultfd/selftests: always dump something in modes

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>
---

 tools/testing/selftests/vm/userfaultfd.c |    2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

--- a/tools/testing/selftests/vm/userfaultfd.c~userfaultfd-selftests-always-dump-something-in-modes
+++ a/tools/testing/selftests/vm/userfaultfd.c
@@ -1291,6 +1291,8 @@  static int userfaultfd_stress(void)
 			printf(" ver");
 		if (bounces & BOUNCE_POLL)
 			printf(" poll");
+		else
+			printf(" read");
 		printf(", ");
 		fflush(stdout);