Skip to content

Commit 8117181

Browse files
committed
userfaultfd01: Covert doc to docparse
+ minor formatting improvements. Signed-off-by: Petr Vorel <[email protected]>
1 parent ac998d6 commit 8117181

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

testcases/kernel/syscalls/userfaultfd/userfaultfd01.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22
/*
33
* Copyright (c) 2019 SUSE LLC
44
* Author: Christian Amann <[email protected]>
5-
*
6-
* Test userfaultfd
7-
*
8-
* Force a pagefault event and handle it using userfaultfd
9-
* from a different thread
105
*/
116

12-
#include "config.h"
13-
#include "tst_test.h"
7+
/*\
8+
* Force a pagefault event and handle it using :man2:`userfaultfd`
9+
* from a different thread.
10+
*/
1411

12+
#include "config.h"
1513
#include <poll.h>
16-
14+
#include "tst_test.h"
1715
#include "tst_safe_macros.h"
1816
#include "tst_safe_pthread.h"
1917
#include "lapi/userfaultfd.h"
@@ -49,14 +47,12 @@ static void handle_thread(void)
4947
pollfd.events = POLLIN;
5048
nready = poll(&pollfd, 1, -1);
5149
if (nready == -1)
52-
tst_brk(TBROK | TERRNO,
53-
"Error on poll");
50+
tst_brk(TBROK | TERRNO, "Error on poll");
5451

5552
SAFE_READ(1, uffd, &msg, sizeof(msg));
5653

5754
if (msg.event != UFFD_EVENT_PAGEFAULT)
58-
tst_brk(TBROK | TERRNO,
59-
"Received unexpected UFFD_EVENT");
55+
tst_brk(TBROK | TERRNO, "Received unexpected UFFD_EVENT");
6056

6157
memset(copy_page, 'X', page_size);
6258

0 commit comments

Comments
 (0)