Skip to content

Commit bfdcca2

Browse files
committed
tree: docparse: Use links to man and kselftest
Add new configuration for extlinks for kselftest. Signed-off-by: Petr Vorel <[email protected]>
1 parent 8117181 commit bfdcca2

File tree

18 files changed

+36
-39
lines changed

18 files changed

+36
-39
lines changed

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
# TODO: allow 2nd parameter to show page description instead of plain URL
4242
'kernel_doc': ('https://docs.kernel.org/%s.html', 'https://docs.kernel.org/%s.html'),
4343
'kernel_tree': ('https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/%s', '%s'),
44+
'kselftest': ('https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/%s', '%s (kselftest)'),
4445
}
4546

4647
spelling_lang = "en_US"

testcases/kernel/syscalls/ioctl/ioctl10.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/*\
77
* Test PROCMAP_QUERY ioctl() for /proc/$PID/maps.
88
*
9-
* Test based on kernel selftests proc-pid-vm.c.
9+
* Test based on :kselftest:`proc/proc-pid-vm.c`.
1010
*
1111
* - ioctl with exact match query_addr
1212
* - ioctl without match query_addr

testcases/kernel/syscalls/memfd_create/memfd_create01.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
/*
33
* Copyright (c) Linux Test Project, 2017-2020
44
* Copyright (C) 2017 Red Hat, Inc.
5+
* Port to LTP <[email protected]>
56
*/
67

7-
/*
8-
* Based on Linux/tools/testing/selftests/memfd/memfd_test.c
9-
* by David Herrmann <[email protected]>
10-
*
11-
* 24/02/2017 Port to LTP <[email protected]>
8+
/*\
9+
* Test based on :kselftest:`memfd/memfd_test.c`.
1210
*/
1311

1412
#define _GNU_SOURCE

testcases/kernel/syscalls/memfd_create/memfd_create02.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
/*
33
* Copyright (C) 2017 Red Hat, Inc.
4+
* Port to LTP <[email protected]>
45
*/
56

6-
/*
7-
* Based on Linux/tools/testing/selftests/memfd/memfd_test.c
8-
* by David Herrmann <[email protected]>
9-
*
10-
* 24/02/2017 Port to LTP <[email protected]>
11-
*/
7+
/*\
8+
* Test based on :kselftest:`memfd/memfd_test.c`.
9+
*/
1210

1311
#define _GNU_SOURCE
1412

testcases/kernel/syscalls/mmap/mmap22.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
*/
55

66
/*\
7-
* Test mmap(2) with MAP_DROPPABLE flag.
7+
* Test :man2:`mmap` with MAP_DROPPABLE flag.
88
*
9-
* Test base on kernel selftests/mm/droppable.c
9+
* Test based on :kselftest:`mm/droppable.c`.
1010
*
1111
* Ensure that memory allocated with MAP_DROPPABLE can be reclaimed
1212
* under memory pressure within a cgroup.

testcases/kernel/syscalls/mount/mount07.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
/*\
88
* It is a basic test for MS_NOSYMFOLLOW mount option and is copied
9-
* from kernel selftests nosymfollow-test.c.
9+
* from :kselftest:`mount/nosymfollow-test.c`.
1010
*
1111
* It tests to make sure that symlink traversal fails with ELOOP when
1212
* 'nosymfollow' is set, but symbolic links can still be created, and
13-
* readlink(2) and realpath(3) still work properly. It also verifies
14-
* that statfs(2) correctly returns ST_NOSYMFOLLOW.
13+
* :man2:`readlink` and :man3:`realpath` still work properly. It also verifies
14+
* that :man2:`statfs` correctly returns ST_NOSYMFOLLOW.
1515
*/
1616

1717
#include <limits.h>

testcases/kernel/syscalls/umount/umount01.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
/*\
9-
* Check the basic functionality of the umount(2) system call.
9+
* Check the basic functionality of the :man2:`umount` system call.
1010
*/
1111

1212
#include <sys/mount.h>

testcases/kernel/syscalls/umount/umount02.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88

99
/*\
10-
* Check for basic errors returned by umount(2) system call.
10+
* Check for basic errors returned by :man2:`umount` system call.
1111
*
12-
* Verify that umount(2) returns -1 and sets errno to
12+
* Verify that :man2:`umount` returns -1 and sets errno to
1313
*
1414
* 1. EBUSY if it cannot be umounted, because dir is still busy.
1515
* 2. EFAULT if specialfile or device file points to invalid address space.

testcases/kernel/syscalls/umount/umount03.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
/*\
9-
* Verify that umount(2) returns -1 and sets errno to EPERM if the user
9+
* Verify that :man2:`umount` returns -1 and sets errno to EPERM if the user
1010
* is not the super-user.
1111
*/
1212

testcases/kernel/syscalls/umount2/umount2_02.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
*/
66

77
/*\
8-
* Test for feature MNT_EXPIRE of umount2():
8+
* Test for feature MNT_EXPIRE of :man2:`umount2`:
99
*
1010
* - EINVAL when flag is specified with either MNT_FORCE or MNT_DETACH
11-
* - EAGAIN when initial call to umount2(2) with MNT_EXPIRE
12-
* - EAGAIN when umount2(2) with MNT_EXPIRE after access(2)
13-
* - succeed when second call to umount2(2) with MNT_EXPIRE
11+
* - EAGAIN when initial call to :man2:`umount2` with MNT_EXPIRE
12+
* - EAGAIN when :man2:`umount2` with MNT_EXPIRE after :man2:`access`
13+
* - succeed when second call to :man2:`umount2` with MNT_EXPIRE
1414
*
15-
* Test for feature UMOUNT_NOFOLLOW of umount2():
15+
* Test for feature UMOUNT_NOFOLLOW of :man2:`umount2`:
1616
*
1717
* - EINVAL when target is a symbolic link
1818
* - succeed when target is a mount point

0 commit comments

Comments
 (0)