docparse: Use C standard comment end
PATCH 1/2 docparse: Use C standard comment end
Current \*/ docparse end emit error:
WARNING: Block comments use a trailing */ on a separate line
Commend is not required for docparse generation thus remove it to keep checkpatch.pl quiet.
--- docparse/README.md | 2 +- testcases/kernel/containers/pidns/pidns13.c | 2 +- testcases/kernel/device-drivers/rtc/rtc02.c | 2 +- testcases/kernel/syscalls/abort/abort01.c | 2 +- testcases/kernel/syscalls/accept/accept01.c | 2 +- testcases/kernel/syscalls/accept/accept02.c | 2 +- testcases/kernel/syscalls/acct/acct01.c | 2 +- testcases/kernel/syscalls/acct/acct02.c | 2 +- testcases/kernel/syscalls/brk/brk02.c | 2 +- testcases/kernel/syscalls/close_range/close_range01.c | 2 +- testcases/kernel/syscalls/close_range/close_range02.c | 2 +- testcases/kernel/syscalls/dup/dup02.c | 2 +- testcases/kernel/syscalls/dup/dup03.c | 2 +- testcases/kernel/syscalls/finit_module/finit_module01.c | 2 +- testcases/kernel/syscalls/finit_module/finit_module02.c | 2 +- testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c | 2 +- testcases/kernel/syscalls/get_mempolicy/get_mempolicy02.c | 2 +- testcases/kernel/syscalls/getdents/getdents01.c | 2 +- testcases/kernel/syscalls/getdents/getdents02.c | 2 +- testcases/kernel/syscalls/getpid/getpid01.c | 2 +- testcases/kernel/syscalls/getpid/getpid02.c | 2 +- testcases/kernel/syscalls/init_module/init_module01.c | 2 +- testcases/kernel/syscalls/init_module/init_module02.c | 2 +- testcases/kernel/syscalls/ipc/msgctl/msgctl06.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl02.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl03.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl04.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl05.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl07.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl09.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl01.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl02.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl03.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl04.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl05.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl06.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl07.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl08.c | 2 +- testcases/kernel/syscalls/mallinfo/mallinfo01.c | 2 +- testcases/kernel/syscalls/mallinfo/mallinfo02.c | 2 +- testcases/kernel/syscalls/mallopt/mallopt01.c | 2 +- testcases/kernel/syscalls/move_pages/move_pages12.c | 2 +- .../kernel/syscalls/name_to_handle_at/name_to_handle_at01.c | 2 +- .../kernel/syscalls/name_to_handle_at/name_to_handle_at02.c | 2 +- .../kernel/syscalls/open_by_handle_at/open_by_handle_at01.c | 2 +- .../kernel/syscalls/open_by_handle_at/open_by_handle_at02.c | 2 +- testcases/kernel/syscalls/ptrace/ptrace11.c | 2 +- testcases/kernel/syscalls/recvmmsg/recvmmsg01.c | 2 +- testcases/kernel/syscalls/sched_getparam/sched_getparam01.c | 2 +- testcases/kernel/syscalls/select/select04.c | 2 +- testcases/kernel/syscalls/sendmmsg/sendmmsg01.c | 2 +- testcases/kernel/syscalls/sendmmsg/sendmmsg02.c | 2 +- testcases/kernel/syscalls/time/time01.c | 2 +- testcases/kernel/syscalls/times/times01.c | 2 +- testcases/kernel/syscalls/truncate/truncate02.c | 2 +- testcases/kernel/syscalls/truncate/truncate03.c | 2 +- testcases/kernel/syscalls/writev/writev03.c | 2 +- 57 files changed, 57 insertions(+), 57 deletions(-)
docparse/README.md +1 -1
@@ -173,7 +173,7 @@ The test documentation is stored in a special comment such as: * * This is a test description. * Consisting of several lines. -\*/ + */ ``` Which will yield following json output:
testcases/kernel/containers/pidns/pidns13.c +1 -1
@@ -20,7 +20,7 @@* * in cinit1, set pipe read end to send SIGUSR1 for asynchronous I/O * * let cinit2 trigger async I/O on pipe write end * * in signal info, check si_code to be POLL_IN and si_fd to be pipe read fd -\*/ +*/ #define _GNU_SOURCE 1#include <sys/wait.h>
testcases/kernel/device-drivers/rtc/rtc02.c +1 -1
@@ -15,7 +15,7 @@* - Read the RTC time back * - Check if the set time and the read time are identical * - Restore RTC time -\*/ +*/ #include <stdio.h> #include "tst_rtctime.h"
testcases/kernel/syscalls/abort/abort01.c +1 -1
@@ -16,7 +16,7 @@* - Fork child. * - Child calls abort. * - Parent checks return status. -\*/ +*/ #include <sys/types.h> #include <sys/wait.h>
testcases/kernel/syscalls/accept/accept01.c +1 -1
@@ -8,7 +8,7 @@/*\ * [DESCRIPTION] * Verify that accept() returns the proper errno for various failure cases. -\*/ +*/ #include <stdio.h> #include <unistd.h>
testcases/kernel/syscalls/accept/accept02.c +1 -1
@@ -19,7 +19,7 @@* * For more information about this CVE see: * https://www.suse.com/security/cve/CVE-2017-8890/ -\*/ +*/ #include <errno.h> #include <sys/socket.h>
testcases/kernel/syscalls/acct/acct01.c +1 -1
@@ -10,7 +10,7 @@/*\ * [DOCUMENTATION] * Verify that acct() returns proper errno on failure. -\*/ +*/ #include <sys/types.h> #include <sys/stat.h>
testcases/kernel/syscalls/acct/acct02.c +1 -1
@@ -21,7 +21,7 @@* * This is also accidental regression test for: * 4d9570158b626 kernel/acct.c: fix the acct->needcheck check in check_free_space() -\*/ +*/ #include <sys/stat.h> #include <errno.h>
testcases/kernel/syscalls/brk/brk02.c +1 -1
@@ -9,7 +9,7 @@* and not expanding the original due to multiple anon pages. mprotect() that * new VMA then brk() back to the original address therefore causing a munmap of * at least one full VMA. -\*/ +*/ #include <unistd.h> #include <sys/mman.h>
testcases/kernel/syscalls/close_range/close_range01.c +1 -1
@@ -21,7 +21,7 @@* * The final test is the actual bug reproducer. Note that we call * clone directly to share the file table. -\*/ +*/ #include <stdlib.h>
testcases/kernel/syscalls/close_range/close_range02.c +1 -1
@@ -10,7 +10,7 @@* - Then check it accepts a large lower fd. * - Finally check CLOEXEC works * -\*/ +*/ #include <stdlib.h>
testcases/kernel/syscalls/dup/dup02.c +1 -1
@@ -13,7 +13,7 @@* [ALGORITHM] * Call dup(2) with invalid argument and make sure it returns -1 with errno set * to EBADF. -\*/ +*/ #include "tst_test.h"
testcases/kernel/syscalls/dup/dup03.c +1 -1
@@ -11,7 +11,7 @@* [ALGORITHM] * Open the maximum allowed number of file descriptors and then try to call * dup() once more and verify it fails with EMFILE. -\*/ +*/ #include <stdlib.h> #include "tst_test.h"
testcases/kernel/syscalls/finit_module/finit_module01.c +1 -1
@@ -11,7 +11,7 @@* [ALGORITHM] * * Inserts a simple module after opening and mmaping the module file. -\*/ +*/ #include <errno.h> #include "lapi/init_module.h"
testcases/kernel/syscalls/finit_module/finit_module02.c +1 -1
@@ -11,7 +11,7 @@* [ALGORITHM] * * Tests various failure scenarios for finit_module(). -\*/ +*/ #include <linux/capability.h> #include <errno.h>
testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c +1 -1
@@ -15,7 +15,7 @@* [DESCRIPTION] * * Verify that get_mempolicy() returns a proper return value and errno for various cases. -\*/ +*/ #include "config.h" #include "tst_test.h"
testcases/kernel/syscalls/get_mempolicy/get_mempolicy02.c +1 -1
@@ -15,7 +15,7 @@* [DESCRIPTION] * * Verify that get_mempolicy() returns a proper return errno for failure cases. -\*/ +*/ #include "config.h" #include "tst_test.h"
testcases/kernel/syscalls/getdents/getdents01.c +1 -1
@@ -13,7 +13,7 @@* Basic getdents() test that checks if directory listing is correct and * complete. * -\*/ +*/ #define _GNU_SOURCE
testcases/kernel/syscalls/getdents/getdents02.c +1 -1
@@ -15,7 +15,7 @@* - getdents() fails with EINVAL if result buffer is too small * - getdents() fails with ENOTDIR if file descriptor does not refer to a directory * - getdents() fails with ENOENT if directory was unlinked() -\*/ +*/ #define _GNU_SOURCE#include <errno.h>
testcases/kernel/syscalls/getpid/getpid01.c +1 -1
@@ -7,7 +7,7 @@* [DESCRIPTION] * * Verify that getpid() system call returns process ID in range 2 ... PID_MAX -\*/ +*/ #include <stdlib.h> #include "tst_test.h"
testcases/kernel/syscalls/getpid/getpid02.c +1 -1
@@ -9,7 +9,7 @@* Check that: * - fork() in parent returns the same pid as getpid() in child * - getppid() in child returns the same pid as getpid() in parent -\*/ +*/ #include <errno.h>
testcases/kernel/syscalls/init_module/init_module01.c +1 -1
@@ -11,7 +11,7 @@* [ALGORITHM] * * Inserts a simple module after opening and mmaping the module file. -\*/ +*/ #include <errno.h> #include "lapi/init_module.h"
testcases/kernel/syscalls/init_module/init_module02.c +1 -1
@@ -11,7 +11,7 @@* [ALGORITHM] * * Tests various failure scenarios for init_module(). -\*/ +*/ #include <linux/capability.h> #include <errno.h>
testcases/kernel/syscalls/ipc/msgctl/msgctl06.c +1 -1
@@ -21,7 +21,7 @@* * Also note that for MSG_INFO the members of the msginfo structure have * completely different meaning than their names seems to suggest. -\*/ +*/ #include <stdio.h> #include <pwd.h>
testcases/kernel/syscalls/ipc/semctl/semctl02.c +1 -1
@@ -8,7 +8,7 @@* [DESCRIPTION] * * Test for semctl() EACCES error. -\*/ +*/ #include <pwd.h> #include "tst_safe_sysv_ipc.h"
testcases/kernel/syscalls/ipc/semctl/semctl03.c +1 -1
@@ -9,7 +9,7 @@* [DESCRIPTION] * * Test for semctl() EINVAL and EFAULT errors -\*/ +*/ #include "tst_safe_sysv_ipc.h" #include "tst_test.h"
testcases/kernel/syscalls/ipc/semctl/semctl04.c +1 -1
@@ -12,7 +12,7 @@* * Runs IPC_SET and IPC_RMID from unprivileged child process. * -\*/ +*/ #include <pwd.h> #include <sys/wait.h>
testcases/kernel/syscalls/ipc/semctl/semctl05.c +1 -1
@@ -10,7 +10,7 @@* [DESCRIPTION] * * Test for semctl() ERANGE error -\*/ +*/ #include "tst_safe_sysv_ipc.h" #include "tst_test.h"
testcases/kernel/syscalls/ipc/semctl/semctl07.c +1 -1
@@ -18,7 +18,7 @@* - semctl() with SETVAL and GETVAL * - semctl() with GETPID * - semctl() with GETNCNT and GETZCNT -\*/ +*/ #include "tst_test.h" #include "tst_safe_sysv_ipc.h"
testcases/kernel/syscalls/ipc/semctl/semctl09.c +1 -1
@@ -31,7 +31,7 @@* * commit 574500a108be1d2a6a0dc97a075c9e0a98371aba * * Author: Dmitry V. Levin <[email protected]> * * Date: Tue, 29 Sep 2020 17:10:20 +0000 (14:10 -0300) -\*/ +*/ #include <stdio.h> #include <pwd.h>
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +1 -1
@@ -15,7 +15,7 @@* - attaching the SHM before fork and letting the children detach it * * We check that the number shm_nattach is correct after each step we do. -\*/ +*/ #define _GNU_SOURCE#include <stdlib.h>
testcases/kernel/syscalls/ipc/shmctl/shmctl02.c +1 -1
@@ -25,7 +25,7 @@* * EPERM - attempt to change root-owned shm * * EPERM - attempt to lock root-owned shm * * EPERM - attempt to unlock root-owned shm -\*/ +*/ #include <pwd.h>
testcases/kernel/syscalls/ipc/shmctl/shmctl03.c +1 -1
@@ -8,7 +8,7 @@* * Call shmctl() with IPC_INFO flag and check that the data are consistent with * /proc/sys/kernel/shm*. -\*/ +*/ #define _GNU_SOURCE#include "tst_test.h"
testcases/kernel/syscalls/ipc/shmctl/shmctl04.c +1 -1
@@ -18,7 +18,7 @@* * Note what we create a SHM segment in the test setup to make sure that there * is at least one during the testrun. -\*/ +*/ #define _GNU_SOURCE#include <stdio.h>
testcases/kernel/syscalls/ipc/shmctl/shmctl05.c +1 -1
@@ -15,7 +15,7 @@* touch_atime(), although it's a race condition so it's not guaranteed to * work. This test is based on the reproducer provided in the fix's commit * message. -\*/ +*/ #include "lapi/syscalls.h" #include "tst_test.h"
testcases/kernel/syscalls/ipc/shmctl/shmctl06.c +1 -1
@@ -7,7 +7,7 @@* [DESCRIPTION] * * Cross verify the _high fields being set to 0 by the kernel. -\*/ +*/ #include <sys/shm.h> #include "lapi/shmbuf.h"
testcases/kernel/syscalls/ipc/shmctl/shmctl07.c +1 -1
@@ -7,7 +7,7 @@* [DESCRIPTION] * * Test for a SHM_LOCK and SHM_UNLOCK. -\*/ +*/ #define _GNU_SOURCE#include <stdio.h>
testcases/kernel/syscalls/ipc/shmctl/shmctl08.c +1 -1
@@ -10,7 +10,7 @@* * The test clears the group and others bits from the shm_perm.mode and checks * the result as well as if the ctime was updated correctly. -\*/ +*/ #define _GNU_SOURCE#include <stdio.h>
testcases/kernel/syscalls/mallinfo/mallinfo01.c +1 -1
@@ -9,7 +9,7 @@* * Basic mallinfo() test. Refer to glibc test mallinfo2 test * https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/tst-mallinfo2.c -\*/ +*/ #include "mallinfo_common.h" #include "tst_safe_macros.h"
testcases/kernel/syscalls/mallinfo/mallinfo02.c +1 -1
@@ -9,7 +9,7 @@* * Basic mallinfo() test for malloc() using sbrk or mmap. * It size > MMAP_THRESHOLD, it will use mmap. Otherwise, use sbrk. -\*/ +*/ #include "mallinfo_common.h" #include "tst_safe_macros.h"
testcases/kernel/syscalls/mallopt/mallopt01.c +1 -1
@@ -10,7 +10,7 @@* [DESCRIPTION] * * Basic mallinfo() and mallopt() testing. -\*/ +*/ #include "../mallinfo/mallinfo_common.h"
testcases/kernel/syscalls/move_pages/move_pages12.c +1 -1
@@ -61,7 +61,7 @@* Date: Mon Dec 14 19:11:51 2020 -0800 * * mm,hwpoison: return -EBUSY when migration fails -\*/ +*/ #include <errno.h> #include <unistd.h>
testcases/kernel/syscalls/name_to_handle_at/name_to_handle_at01.c +1 -1
@@ -12,7 +12,7 @@* - Check that EOVERFLOW is returned as expected by name_to_handle_at(). * - Check that we were able to access a file's stat with name_to_handle_at() * and open_by_handle_at(). -\*/ +*/ #define _GNU_SOURCE#include <sys/stat.h>
testcases/kernel/syscalls/name_to_handle_at/name_to_handle_at02.c +1 -1
@@ -7,7 +7,7 @@* [DESCRIPTION] * * Failure tests for name_to_handle_at(). -\*/ +*/ #define _GNU_SOURCE#include "lapi/name_to_handle_at.h"
testcases/kernel/syscalls/open_by_handle_at/open_by_handle_at01.c +1 -1
@@ -12,7 +12,7 @@* * Check that we were able to access a file's stat which is opened with * open_by_handle_at(). -\*/ +*/ #define _GNU_SOURCE#include <sys/stat.h>
testcases/kernel/syscalls/open_by_handle_at/open_by_handle_at02.c +1 -1
@@ -7,7 +7,7 @@* [DESCRIPTION] * * Failure tests for open_by_handle_at(). -\*/ +*/ #define _GNU_SOURCE#include <linux/capability.h> #include "tst_capability.h"
testcases/kernel/syscalls/ptrace/ptrace11.c +1 -1
@@ -10,7 +10,7 @@* Before kernel 2.6.26 we could not trace init(1) process and ptrace() would * fail with EPERM. This case just checks whether we can trace init(1) process * successfully. -\*/ +*/ #include <errno.h> #include <signal.h>
testcases/kernel/syscalls/recvmmsg/recvmmsg01.c +1 -1
@@ -8,7 +8,7 @@* - EINVAL Bad seconds value for the timeout argument * - EINVAL Bad nanoseconds value for the timeout argument * - EFAULT Bad timeout address -\*/ +*/ #define _GNU_SOURCE#include "../sendmmsg/sendmmsg.h"
testcases/kernel/syscalls/sched_getparam/sched_getparam01.c +1 -1
@@ -15,7 +15,7 @@* for the calling process. * - If pid is not zero, sched_getparam(2) gets the scheduling * parameters for the specified [pid] process. -\*/ +*/ #include <errno.h> #include <stdlib.h>
testcases/kernel/syscalls/select/select04.c +1 -1
@@ -12,7 +12,7 @@* [ALGORITHM] * - Check that writefds flag is cleared on full pipe * - Check that readfds flag is cleared on empty pipe -\*/ +*/ #include <unistd.h> #include <errno.h>
testcases/kernel/syscalls/sendmmsg/sendmmsg01.c +1 -1
@@ -4,7 +4,7 @@* * This test is based on source contained in the man pages for sendmmsg and * recvmmsg in release 4.15 of the Linux man-pages project. -\*/ +*/ #define _GNU_SOURCE#include "sendmmsg.h"
testcases/kernel/syscalls/sendmmsg/sendmmsg02.c +1 -1
@@ -5,7 +5,7 @@* * - EBADF Bad socket file descriptor * - EFAULT Bad message vector address -\*/ +*/ #define _GNU_SOURCE#include "sendmmsg.h"
testcases/kernel/syscalls/time/time01.c +1 -1
@@ -9,7 +9,7 @@* limited exposure of the system call. * - Verify that time(2) returns the value of time in seconds since the Epoch * and stores this value in the memory pointed to by the parameter. -\*/ +*/ #include <time.h> #include <errno.h>
testcases/kernel/syscalls/times/times01.c +1 -1
@@ -7,7 +7,7 @@* * This is a Phase I test for the times(2) system call. It is intended to * provide a limited exposure of the system call. -\*/ +*/ #include <sys/times.h> #include <errno.h>
testcases/kernel/syscalls/truncate/truncate02.c +1 -1
@@ -13,7 +13,7 @@* - If the file is larger than the specified length, the extra data is lost. * - If the file is shorter than the specified length, the extra data is filled by '0'. * - truncate(2) doesn't change offset. -\*/ +*/ #include <errno.h> #include <unistd.h>
testcases/kernel/syscalls/truncate/truncate03.c +1 -1
@@ -27,7 +27,7 @@* is larger than the maximum file size. * - truncate(2) returns -1 and sets errno to ELOOP if too many symbolic * links were encountered in translating the pathname. -\*/ +*/ #define _GNU_SOURCE
testcases/kernel/syscalls/writev/writev03.c +1 -1
@@ -11,7 +11,7 @@* where writev() first writes uninitialized data into the file (possibly * exposing internal kernel structures) and then overwrites it with the real * iovec contents later. -\*/ +*/ /* * Bugs fixed in:
Signature · 1 line
2.30.1
PATCH 2/2 docparse: Unify Description and Algorithm titles
Instead of fixing sources docs unify it during doc generation.
--- docparse/testinfo.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docparse/testinfo.pl +1 -1
@@ -308,7 +308,7 @@ sub content_all_tests # fix formatting for asciidoc [DOCUMENTATION] => *DOCUMENTATION* if ($doc =~ s/^\[(.*)\]$/$1/) { - $doc = paragraph(bold($doc)); + $doc = paragraph(bold(ucfirst(lc($doc)))); } $content .= "$doc\n";
Signature · 1 line
2.30.1
PATCH 2/2 docparse: Unify Description and Algorithm titles
Quoted 1 line · Petr Vorel
Instead owo'n'df fixing sources docs unify it during doc generation.
Hi Petr,
Your fix unifies Description and Algorithm in metadata.{html, pdf}. I wonder if we should do the conversion in metadata.json instead.
Best Regards,
Xiao Yang
Quoted 18 lines
Signed-off-by Petr Vorel<[email protected]>--- docparse/testinfo.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)docparse/testinfo.pl +1
-1@@ -308,7 +308,7 @@ sub content_all_tests # fix formatting for asciidoc [DOCUMENTATION] => *DOCUMENTATION* if ($doc =~ s/^\[(.*)\]$/$1/) { - $doc = paragraph(bold($doc)); + $doc = paragraph(bold(ucfirst(lc($doc)))); } $content .= "$doc\n";
PATCH 2/2 docparse: Unify Description and Algorithm titles
Hi Yang,
Quoted 6 lines · Petr Vorel
Quoted 1 line
Instead owo'n'df fixing sources docs unify it during doc generation.
Hi Petr,
Your fix unifies Description and Algorithm in metadata.{html, pdf}. I wonder if we should do the conversion in metadata.json instead.
Yep, that could work as well. Not a strong opinion about it.
Kind regards,
Petr
Quoted 2 lines
Best Regards,
Xiao Yang
PATCH 2/2 docparse: Unify Description and Algorithm titles
In reply to Petr VorelHi!
docparse/testinfo.pl sub content_all_tests · line 309
Quoted 7 lines
docparse/testinfo.pl +0
-0@@ -308,7 +308,7 @@ sub content_all_tests # fix formatting for asciidoc [DOCUMENTATION] => *DOCUMENTATION*
^ This should be *Documentation*
docparse/testinfo.pl sub content_all_tests · line 314
Quoted 6 lines
docparse/testinfo.pl +1
-1if ($doc =~ s/^\[(.*)\]$/$1/) { - $doc = paragraph(bold($doc)); + $doc = paragraph(bold(ucfirst(lc($doc)))); } $content .= "$doc\n";
Other than that it looks good.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 2/2 docparse: Unify Description and Algorithm titles
Hi,
Quoted 7 lines
Quoted 1 line
# fix formatting for asciidoc [DOCUMENTATION] => *DOCUMENTATION*^ This should be *Documentation*
Quoted 8 lines
docparse/testinfo.pl sub content_all_tests · line 314
Quoted 6 lines
docparse/testinfo.pl +1
-1if ($doc =~ s/^\[(.*)\]$/$1/) { - $doc = paragraph(bold($doc)); + $doc = paragraph(bold(ucfirst(lc($doc)))); } $content .= "$doc\n";Other than that it looks good.
Thanks, fixed and patchset merged.
Yang, sorry I didn't put it into docparse.c.
Quoted 1 line
Reviewed-by Cyril Hrubis <[email protected]>
PATCH 2/2 docparse: Unify Description and Algorithm titles
? 2021/3/12 19:02, Petr Vorel ??:
Quoted 14 lines
Hi,
Quoted 6 lines
Quoted 1 line
# fix formatting for asciidoc [DOCUMENTATION] => *DOCUMENTATION*^ This should be *Documentation*Quoted 6 lines
docparse/testinfo.pl sub content_all_tests · line 314
Quoted 5 lines
if ($doc =~ s/^\[(.*)\]$/$1/) {docparse/testinfo.pl +1
-1- $doc = paragraph(bold($doc)); + $doc = paragraph(bold(ucfirst(lc($doc)))); } $content .= "$doc\n";Other than that it looks good.
Quoted 3 lines
Thanks, fixed and patchset merged.
Yang, sorry I didn't put it into
docparse.c.
Hi Petr,
Never mind, we can do it later when someone needs to unify these titles in metadata.json.
Best Regards,
Xiao Yang
Quoted 4 lines
Quoted 1 line
Reviewed-by Cyril Hrubis<[email protected]>.
PATCH 1/2 docparse: Use C standard comment end
In reply to Petr VorelQuoted 5 lines · Petr Vorel
Current \*/ docparse end emit error:
WARNING: Block comments use a trailing */ on a separate lineCommend is not required for docparse generation thus remove it to keep checkpatch.pl quiet.
Hi Petr,
LGTM. :-)
One minor hint: it needs to rebase.
Best Regards,
Xiao Yang
Quoted 803 lines
Suggested-by Martin Doucha<[email protected]>Signed-off-by Petr Vorel<[email protected]>--- docparse/README.md | 2 +- testcases/kernel/containers/pidns/pidns13.c | 2 +- testcases/kernel/device-drivers/rtc/rtc02.c | 2 +- testcases/kernel/syscalls/abort/abort01.c | 2 +- testcases/kernel/syscalls/accept/accept01.c | 2 +- testcases/kernel/syscalls/accept/accept02.c | 2 +- testcases/kernel/syscalls/acct/acct01.c | 2 +- testcases/kernel/syscalls/acct/acct02.c | 2 +- testcases/kernel/syscalls/brk/brk02.c | 2 +- testcases/kernel/syscalls/close_range/close_range01.c | 2 +- testcases/kernel/syscalls/close_range/close_range02.c | 2 +- testcases/kernel/syscalls/dup/dup02.c | 2 +- testcases/kernel/syscalls/dup/dup03.c | 2 +- testcases/kernel/syscalls/finit_module/finit_module01.c | 2 +- testcases/kernel/syscalls/finit_module/finit_module02.c | 2 +- testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c | 2 +- testcases/kernel/syscalls/get_mempolicy/get_mempolicy02.c | 2 +- testcases/kernel/syscalls/getdents/getdents01.c | 2 +- testcases/kernel/syscalls/getdents/getdents02.c | 2 +- testcases/kernel/syscalls/getpid/getpid01.c | 2 +- testcases/kernel/syscalls/getpid/getpid02.c | 2 +- testcases/kernel/syscalls/init_module/init_module01.c | 2 +- testcases/kernel/syscalls/init_module/init_module02.c | 2 +- testcases/kernel/syscalls/ipc/msgctl/msgctl06.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl02.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl03.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl04.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl05.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl07.c | 2 +- testcases/kernel/syscalls/ipc/semctl/semctl09.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl01.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl02.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl03.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl04.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl05.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl06.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl07.c | 2 +- testcases/kernel/syscalls/ipc/shmctl/shmctl08.c | 2 +- testcases/kernel/syscalls/mallinfo/mallinfo01.c | 2 +- testcases/kernel/syscalls/mallinfo/mallinfo02.c | 2 +- testcases/kernel/syscalls/mallopt/mallopt01.c | 2 +- testcases/kernel/syscalls/move_pages/move_pages12.c | 2 +- .../kernel/syscalls/name_to_handle_at/name_to_handle_at01.c | 2 +- .../kernel/syscalls/name_to_handle_at/name_to_handle_at02.c | 2 +- .../kernel/syscalls/open_by_handle_at/open_by_handle_at01.c | 2 +- .../kernel/syscalls/open_by_handle_at/open_by_handle_at02.c | 2 +- testcases/kernel/syscalls/ptrace/ptrace11.c | 2 +- testcases/kernel/syscalls/recvmmsg/recvmmsg01.c | 2 +- testcases/kernel/syscalls/sched_getparam/sched_getparam01.c | 2 +- testcases/kernel/syscalls/select/select04.c | 2 +- testcases/kernel/syscalls/sendmmsg/sendmmsg01.c | 2 +- testcases/kernel/syscalls/sendmmsg/sendmmsg02.c | 2 +- testcases/kernel/syscalls/time/time01.c | 2 +- testcases/kernel/syscalls/times/times01.c | 2 +- testcases/kernel/syscalls/truncate/truncate02.c | 2 +- testcases/kernel/syscalls/truncate/truncate03.c | 2 +- testcases/kernel/syscalls/writev/writev03.c | 2 +- 57 files changed, 57 insertions(+), 57 deletions(-)docparse/README.md +1
-1@@ -173,7 +173,7 @@ The test documentation is stored in a special comment such as: * * This is a test description. * Consisting of several lines. -\*/ + */ ``` Which will yield following json output:testcases/kernel/containers/pidns/pidns13.c +1
-1@@ -20,7 +20,7 @@* * in cinit1, set pipe read end to send SIGUSR1 for asynchronous I/O * * let cinit2 trigger async I/O on pipe write end * * in signal info, check si_code to be POLL_IN and si_fd to be pipe read fd -\*/ +*/ #define _GNU_SOURCE 1#include <sys/wait.h> testcases/kernel/device-drivers/rtc/rtc02.c +1
-1@@ -15,7 +15,7 @@* - Read the RTC time back * - Check if the set time and the read time are identical * - Restore RTC time -\*/ +*/ #include <stdio.h> #include "tst_rtctime.h" testcases/kernel/syscalls/abort/abort01.c +1
-1@@ -16,7 +16,7 @@* - Fork child. * - Child calls abort. * - Parent checks return status. -\*/ +*/ #include <sys/types.h> #include <sys/wait.h> testcases/kernel/syscalls/accept/accept01.c +1
-1@@ -8,7 +8,7 @@/*\ * [DESCRIPTION] * Verify that accept() returns the proper errno for various failure cases. -\*/ +*/ #include <stdio.h> #include <unistd.h> testcases/kernel/syscalls/accept/accept02.c +1
-1@@ -19,7 +19,7 @@* * For more information about this CVE see: * https://www.suse.com/security/cve/CVE-2017-8890/ -\*/ +*/ #include <errno.h> #include <sys/socket.h> testcases/kernel/syscalls/acct/acct01.c +1
-1@@ -10,7 +10,7 @@/*\ * [DOCUMENTATION] * Verify that acct() returns proper errno on failure. -\*/ +*/ #include <sys/types.h> #include <sys/stat.h> testcases/kernel/syscalls/acct/acct02.c +1
-1@@ -21,7 +21,7 @@* * This is also accidental regression test for: * 4d9570158b626 kernel/acct.c: fix the acct->needcheck check in check_free_space() -\*/ +*/ #include <sys/stat.h> #include <errno.h> testcases/kernel/syscalls/brk/brk02.c +1
-1@@ -9,7 +9,7 @@* and not expanding the original due to multiple anon pages. mprotect() that * new VMA then brk() back to the original address therefore causing a munmap of * at least one full VMA. -\*/ +*/ #include <unistd.h> #include <sys/mman.h> testcases/kernel/syscalls/close_range/close_range01.c +1
-1@@ -21,7 +21,7 @@* * The final test is the actual bug reproducer. Note that we call * clone directly to share the file table. -\*/ +*/ #include <stdlib.h> testcases/kernel/syscalls/close_range/close_range02.c +1
-1@@ -10,7 +10,7 @@* - Then check it accepts a large lower fd. * - Finally check CLOEXEC works * -\*/ +*/ #include <stdlib.h> testcases/kernel/syscalls/dup/dup02.c +1
-1@@ -13,7 +13,7 @@* [ALGORITHM] * Call dup(2) with invalid argument and make sure it returns -1 with errno set * to EBADF. -\*/ +*/ #include "tst_test.h" testcases/kernel/syscalls/dup/dup03.c +1
-1@@ -11,7 +11,7 @@* [ALGORITHM] * Open the maximum allowed number of file descriptors and then try to call * dup() once more and verify it fails with EMFILE. -\*/ +*/ #include <stdlib.h> #include "tst_test.h" testcases/kernel/syscalls/finit_module/finit_module01.c +1
-1@@ -11,7 +11,7 @@* [ALGORITHM] * * Inserts a simple module after opening and mmaping the module file. -\*/ +*/ #include <errno.h> #include "lapi/init_module.h" testcases/kernel/syscalls/finit_module/finit_module02.c +1
-1@@ -11,7 +11,7 @@* [ALGORITHM] * * Tests various failure scenarios for finit_module(). -\*/ +*/ #include <linux/capability.h> #include <errno.h> testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c +1
-1@@ -15,7 +15,7 @@* [DESCRIPTION] * * Verify that get_mempolicy() returns a proper return value and errno for various cases. -\*/ +*/ #include "config.h" #include "tst_test.h" testcases/kernel/syscalls/get_mempolicy/get_mempolicy02.c +1
-1@@ -15,7 +15,7 @@* [DESCRIPTION] * * Verify that get_mempolicy() returns a proper return errno for failure cases. -\*/ +*/ #include "config.h" #include "tst_test.h" testcases/kernel/syscalls/getdents/getdents01.c +1
-1@@ -13,7 +13,7 @@* Basic getdents() test that checks if directory listing is correct and * complete. * -\*/ +*/ #define _GNU_SOURCEtestcases/kernel/syscalls/getdents/getdents02.c +1
-1@@ -15,7 +15,7 @@* - getdents() fails with EINVAL if result buffer is too small * - getdents() fails with ENOTDIR if file descriptor does not refer to a directory * - getdents() fails with ENOENT if directory was unlinked() -\*/ +*/ #define _GNU_SOURCE#include <errno.h> testcases/kernel/syscalls/getpid/getpid01.c +1
-1@@ -7,7 +7,7 @@* [DESCRIPTION] * * Verify that getpid() system call returns process ID in range 2 ... PID_MAX -\*/ +*/ #include <stdlib.h> #include "tst_test.h" testcases/kernel/syscalls/getpid/getpid02.c +1
-1@@ -9,7 +9,7 @@* Check that: * - fork() in parent returns the same pid as getpid() in child * - getppid() in child returns the same pid as getpid() in parent -\*/ +*/ #include <errno.h> testcases/kernel/syscalls/init_module/init_module01.c +1
-1@@ -11,7 +11,7 @@* [ALGORITHM] * * Inserts a simple module after opening and mmaping the module file. -\*/ +*/ #include <errno.h> #include "lapi/init_module.h" testcases/kernel/syscalls/init_module/init_module02.c +1
-1@@ -11,7 +11,7 @@* [ALGORITHM] * * Tests various failure scenarios for init_module(). -\*/ +*/ #include <linux/capability.h> #include <errno.h> testcases/kernel/syscalls/ipc/msgctl/msgctl06.c +1
-1@@ -21,7 +21,7 @@* * Also note that for MSG_INFO the members of the msginfo structure have * completely different meaning than their names seems to suggest. -\*/ +*/ #include <stdio.h> #include <pwd.h> testcases/kernel/syscalls/ipc/semctl/semctl02.c +1
-1@@ -8,7 +8,7 @@* [DESCRIPTION] * * Test for semctl() EACCES error. -\*/ +*/ #include <pwd.h> #include "tst_safe_sysv_ipc.h" testcases/kernel/syscalls/ipc/semctl/semctl03.c +1
-1@@ -9,7 +9,7 @@* [DESCRIPTION] * * Test for semctl() EINVAL and EFAULT errors -\*/ +*/ #include "tst_safe_sysv_ipc.h" #include "tst_test.h" testcases/kernel/syscalls/ipc/semctl/semctl04.c +1
-1@@ -12,7 +12,7 @@* * Runs IPC_SET and IPC_RMID from unprivileged child process. * -\*/ +*/ #include <pwd.h> #include <sys/wait.h> testcases/kernel/syscalls/ipc/semctl/semctl05.c +1
-1@@ -10,7 +10,7 @@* [DESCRIPTION] * * Test for semctl() ERANGE error -\*/ +*/ #include "tst_safe_sysv_ipc.h" #include "tst_test.h" testcases/kernel/syscalls/ipc/semctl/semctl07.c +1
-1@@ -18,7 +18,7 @@* - semctl() with SETVAL and GETVAL * - semctl() with GETPID * - semctl() with GETNCNT and GETZCNT -\*/ +*/ #include "tst_test.h" #include "tst_safe_sysv_ipc.h" testcases/kernel/syscalls/ipc/semctl/semctl09.c +1
-1@@ -31,7 +31,7 @@* * commit 574500a108be1d2a6a0dc97a075c9e0a98371aba * * Author: Dmitry V. Levin<[email protected]> * * Date: Tue, 29 Sep 2020 17:10:20 +0000 (14:10 -0300) -\*/ +*/ #include <stdio.h> #include <pwd.h> testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +1
-1@@ -15,7 +15,7 @@* - attaching the SHM before fork and letting the children detach it * * We check that the number shm_nattach is correct after each step we do. -\*/ +*/ #define _GNU_SOURCE#include <stdlib.h> testcases/kernel/syscalls/ipc/shmctl/shmctl02.c +1
-1@@ -25,7 +25,7 @@* * EPERM - attempt to change root-owned shm * * EPERM - attempt to lock root-owned shm * * EPERM - attempt to unlock root-owned shm -\*/ +*/ #include <pwd.h> testcases/kernel/syscalls/ipc/shmctl/shmctl03.c +1
-1@@ -8,7 +8,7 @@* * Call shmctl() with IPC_INFO flag and check that the data are consistent with * /proc/sys/kernel/shm*. -\*/ +*/ #define _GNU_SOURCE#include "tst_test.h" testcases/kernel/syscalls/ipc/shmctl/shmctl04.c +1
-1@@ -18,7 +18,7 @@* * Note what we create a SHM segment in the test setup to make sure that there * is at least one during the testrun. -\*/ +*/ #define _GNU_SOURCE#include <stdio.h> testcases/kernel/syscalls/ipc/shmctl/shmctl05.c +1
-1@@ -15,7 +15,7 @@* touch_atime(), although it's a race condition so it's not guaranteed to * work. This test is based on the reproducer provided in the fix's commit * message. -\*/ +*/ #include "lapi/syscalls.h" #include "tst_test.h" testcases/kernel/syscalls/ipc/shmctl/shmctl06.c +1
-1@@ -7,7 +7,7 @@* [DESCRIPTION] * * Cross verify the _high fields being set to 0 by the kernel. -\*/ +*/ #include <sys/shm.h> #include "lapi/shmbuf.h" testcases/kernel/syscalls/ipc/shmctl/shmctl07.c +1
-1@@ -7,7 +7,7 @@* [DESCRIPTION] * * Test for a SHM_LOCK and SHM_UNLOCK. -\*/ +*/ #define _GNU_SOURCE#include <stdio.h> testcases/kernel/syscalls/ipc/shmctl/shmctl08.c +1
-1@@ -10,7 +10,7 @@* * The test clears the group and others bits from the shm_perm.mode and checks * the result as well as if the ctime was updated correctly. -\*/ +*/ #define _GNU_SOURCE#include <stdio.h> testcases/kernel/syscalls/mallinfo/mallinfo01.c +1
-1@@ -9,7 +9,7 @@* * Basic mallinfo() test. Refer to glibc test mallinfo2 test * https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/tst-mallinfo2.c -\*/ +*/ #include "mallinfo_common.h" #include "tst_safe_macros.h" testcases/kernel/syscalls/mallinfo/mallinfo02.c +1
-1@@ -9,7 +9,7 @@* * Basic mallinfo() test for malloc() using sbrk or mmap. * It size> MMAP_THRESHOLD, it will use mmap. Otherwise, use sbrk. -\*/ +*/ #include "mallinfo_common.h" #include "tst_safe_macros.h" testcases/kernel/syscalls/mallopt/mallopt01.c +1
-1@@ -10,7 +10,7 @@* [DESCRIPTION] * * Basic mallinfo() and mallopt() testing. -\*/ +*/ #include "../mallinfo/mallinfo_common.h" testcases/kernel/syscalls/move_pages/move_pages12.c +1
-1@@ -61,7 +61,7 @@* Date: Mon Dec 14 19:11:51 2020 -0800 * * mm,hwpoison: return -EBUSY when migration fails -\*/ +*/ #include <errno.h> #include <unistd.h> testcases/kernel/syscalls/name_to_handle_at/name_to_handle_at01.c +1
-1@@ -12,7 +12,7 @@* - Check that EOVERFLOW is returned as expected by name_to_handle_at(). * - Check that we were able to access a file's stat with name_to_handle_at() * and open_by_handle_at(). -\*/ +*/ #define _GNU_SOURCE#include <sys/stat.h> testcases/kernel/syscalls/name_to_handle_at/name_to_handle_at02.c +1
-1@@ -7,7 +7,7 @@* [DESCRIPTION] * * Failure tests for name_to_handle_at(). -\*/ +*/ #define _GNU_SOURCE#include "lapi/name_to_handle_at.h" testcases/kernel/syscalls/open_by_handle_at/open_by_handle_at01.c +1
-1@@ -12,7 +12,7 @@* * Check that we were able to access a file's stat which is opened with * open_by_handle_at(). -\*/ +*/ #define _GNU_SOURCE#include <sys/stat.h> testcases/kernel/syscalls/open_by_handle_at/open_by_handle_at02.c +1
-1@@ -7,7 +7,7 @@* [DESCRIPTION] * * Failure tests for open_by_handle_at(). -\*/ +*/ #define _GNU_SOURCE#include <linux/capability.h> #include "tst_capability.h" testcases/kernel/syscalls/ptrace/ptrace11.c +1
-1@@ -10,7 +10,7 @@* Before kernel 2.6.26 we could not trace init(1) process and ptrace() would * fail with EPERM. This case just checks whether we can trace init(1) process * successfully. -\*/ +*/ #include <errno.h> #include <signal.h> testcases/kernel/syscalls/recvmmsg/recvmmsg01.c +1
-1@@ -8,7 +8,7 @@* - EINVAL Bad seconds value for the timeout argument * - EINVAL Bad nanoseconds value for the timeout argument * - EFAULT Bad timeout address -\*/ +*/ #define _GNU_SOURCE#include "../sendmmsg/sendmmsg.h" testcases/kernel/syscalls/sched_getparam/sched_getparam01.c +1
-1@@ -15,7 +15,7 @@* for the calling process. * - If pid is not zero, sched_getparam(2) gets the scheduling * parameters for the specified [pid] process. -\*/ +*/ #include <errno.h> #include <stdlib.h> testcases/kernel/syscalls/select/select04.c +1
-1@@ -12,7 +12,7 @@* [ALGORITHM] * - Check that writefds flag is cleared on full pipe * - Check that readfds flag is cleared on empty pipe -\*/ +*/ #include <unistd.h> #include <errno.h> testcases/kernel/syscalls/sendmmsg/sendmmsg01.c +1
-1@@ -4,7 +4,7 @@* * This test is based on source contained in the man pages for sendmmsg and * recvmmsg in release 4.15 of the Linux man-pages project. -\*/ +*/ #define _GNU_SOURCE#include "sendmmsg.h" testcases/kernel/syscalls/sendmmsg/sendmmsg02.c +1
-1@@ -5,7 +5,7 @@* * - EBADF Bad socket file descriptor * - EFAULT Bad message vector address -\*/ +*/ #define _GNU_SOURCE#include "sendmmsg.h" testcases/kernel/syscalls/time/time01.c +1
-1@@ -9,7 +9,7 @@* limited exposure of the system call. * - Verify that time(2) returns the value of time in seconds since the Epoch * and stores this value in the memory pointed to by the parameter. -\*/ +*/ #include <time.h> #include <errno.h> testcases/kernel/syscalls/times/times01.c +1
-1@@ -7,7 +7,7 @@* * This is a Phase I test for the times(2) system call. It is intended to * provide a limited exposure of the system call. -\*/ +*/ #include <sys/times.h> #include <errno.h> testcases/kernel/syscalls/truncate/truncate02.c +1
-1@@ -13,7 +13,7 @@* - If the file is larger than the specified length, the extra data is lost. * - If the file is shorter than the specified length, the extra data is filled by '0'. * - truncate(2) doesn't change offset. -\*/ +*/ #include <errno.h> #include <unistd.h> testcases/kernel/syscalls/truncate/truncate03.c +1
-1@@ -27,7 +27,7 @@* is larger than the maximum file size. * - truncate(2) returns -1 and sets errno to ELOOP if too many symbolic * links were encountered in translating the pathname. -\*/ +*/ #define _GNU_SOURCEtestcases/kernel/syscalls/writev/writev03.c +1
-1@@ -11,7 +11,7 @@* where writev() first writes uninitialized data into the file (possibly * exposing internal kernel structures) and then overwrites it with the real * iovec contents later. -\*/ +*/ /* * Bugs fixed in:
PATCH 1/2 docparse: Use C standard comment end
In reply to Petr Vorel