From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 05/11] syscalls: Add a few documentation comments
Date: Mon, 5 Oct 2020 15:30:48 +0200 [thread overview]
Message-ID: <20201005133054.23587-6-chrubis@suse.cz> (raw)
In-Reply-To: <20201005133054.23587-1-chrubis@suse.cz>
From: Cyril Hrubis <metan@ucw.cz>
So that it shows up in the resulting json file.
Signed-off-by: Cyril Hrubis <metan@ucw.cz>
---
testcases/kernel/syscalls/abort/abort01.c | 16 ++++++++++------
testcases/kernel/syscalls/accept/accept01.c | 8 +++++---
testcases/kernel/syscalls/accept/accept02.c | 7 +++++--
testcases/kernel/syscalls/acct/acct01.c | 5 +++++
testcases/kernel/syscalls/acct/acct02.c | 6 ++++--
5 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/testcases/kernel/syscalls/abort/abort01.c b/testcases/kernel/syscalls/abort/abort01.c
index 9505a5eec..b93324b34 100644
--- a/testcases/kernel/syscalls/abort/abort01.c
+++ b/testcases/kernel/syscalls/abort/abort01.c
@@ -5,14 +5,18 @@
* 01/02/2003 Port to LTP avenkat@us.ibm.com
* 11/11/2002: Ported to LTP Suite by Ananda
* 06/30/2001 Port to Linux nsharoff@us.ibm.com
- *
- * ALGORITHM
- * Fork child. Have child abort, check return status.
- *
- * RESTRICTIONS
- * The ulimit for core file size must be greater than 0.
*/
+/*\
+ * [DESCRIPTION]
+ * Checks that process which called abort() gets killed by SIGIOT and dumps core.
+ *
+ * [ALGORITHM]
+ * - Fork child.
+ * - Child calls abort.
+ * - Parent checks return status.
+\*/
+
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
diff --git a/testcases/kernel/syscalls/accept/accept01.c b/testcases/kernel/syscalls/accept/accept01.c
index 4e30906f2..01d6db84c 100644
--- a/testcases/kernel/syscalls/accept/accept01.c
+++ b/testcases/kernel/syscalls/accept/accept01.c
@@ -3,11 +3,13 @@
/*
* Copyright (c) International Business Machines Corp., 2001
* 07/2001 Ported by Wayne Boyer
- *
- * Description:
- * Verify that accept() returns the proper errno for various failure cases
*/
+/*\
+ * [DESCRIPTION]
+ * Verify that accept() returns the proper errno for various failure cases.
+\*/
+
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
diff --git a/testcases/kernel/syscalls/accept/accept02.c b/testcases/kernel/syscalls/accept/accept02.c
index 37ab8b64f..7fb6a494a 100644
--- a/testcases/kernel/syscalls/accept/accept02.c
+++ b/testcases/kernel/syscalls/accept/accept02.c
@@ -3,7 +3,10 @@
* Copyright (c) 2019 SUSE LLC
* Author: Christian Amann <camann@suse.com>
*/
-/* Test for CVE-2017-8890
+/*\
+ * [DESCRIPTION]
+ *
+ * Test for CVE-2017-8890
*
* In Kernels up to 4.10.15 missing commit 657831ff the multicast
* group information of a socket gets copied over to a newly created
@@ -16,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>
diff --git a/testcases/kernel/syscalls/acct/acct01.c b/testcases/kernel/syscalls/acct/acct01.c
index c161d2a2c..60e81bfad 100644
--- a/testcases/kernel/syscalls/acct/acct01.c
+++ b/testcases/kernel/syscalls/acct/acct01.c
@@ -7,6 +7,11 @@
/* 12/03/2002 Port to LTP robbiew@us.ibm.com */
/* 06/30/2001 Port to Linux nsharoff@us.ibm.com */
+/*\
+ * [DOCUMENTATION]
+ * Verify that acct() returns proper errno on failure.
+\*/
+
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
diff --git a/testcases/kernel/syscalls/acct/acct02.c b/testcases/kernel/syscalls/acct/acct02.c
index 8ee1bfcf8..e718e7df4 100644
--- a/testcases/kernel/syscalls/acct/acct02.c
+++ b/testcases/kernel/syscalls/acct/acct02.c
@@ -3,7 +3,9 @@
* Copyright (c) SUSE LLC, 2019
* Author: Christian Amann <camann@suse.com>
*/
-/*
+/*\
+ * [DOCUMENTATION]
+ *
* This tests if the kernel writes correct data to the
* process accounting file.
*
@@ -19,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>
--
2.26.2
next prev parent reply other threads:[~2020-10-05 13:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 13:30 [LTP] [PATCH 00/11] Test metadata extraction Cyril Hrubis
2020-10-05 13:30 ` [LTP] [PATCH 01/11] make: Support compiling native build tools Cyril Hrubis
2020-10-05 13:30 ` [LTP] [PATCH 02/11] travis: Add git Cyril Hrubis
2020-10-05 13:30 ` [LTP] [PATCH 03/11] docparse: Add test documentation parser Cyril Hrubis
2020-10-23 7:01 ` Li Wang
2020-10-23 9:36 ` Li Wang
2020-10-05 13:30 ` [LTP] [PATCH 04/11] docparse: Add README Cyril Hrubis
2020-10-05 14:15 ` Jan Stancek
2020-10-13 11:59 ` Cyril Hrubis
2020-10-05 13:30 ` Cyril Hrubis [this message]
2020-10-05 13:30 ` [LTP] [PATCH 06/11] syscalls: Move needs_drivers inside of the tst_test struct Cyril Hrubis
2020-10-05 13:30 ` [LTP] [PATCH 07/11] make: Allow {INSTALL, MAKE}_TARGETS be a directory Cyril Hrubis
2020-10-05 13:30 ` [LTP] [PATCH 08/11] make: Allow CLEAN_TARGETS to remove directories Cyril Hrubis
2020-10-05 13:30 ` [LTP] [PATCH 09/11] travis: Install docparse dependencies Cyril Hrubis
2020-10-21 10:38 ` Li Wang
2020-10-05 13:30 ` [LTP] [PATCH 10/11] docparse: Add configure options Cyril Hrubis
2020-10-05 13:30 ` [LTP] [PATCH 11/11] docparse: Generate html and pdf using asciidoc{, tor} Cyril Hrubis
2020-10-23 6:18 ` Li Wang
2020-10-23 7:19 ` Petr Vorel
2020-10-05 13:35 ` [LTP] [PATCH 00/11] Test metadata extraction Cyril Hrubis
2020-10-12 8:53 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201005133054.23587-6-chrubis@suse.cz \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox