[LTP] [PATCH v3 2/7] syscalls/pidfd_send_signal: Add docparse formatting

Yang Xu xuyang2018.jy@fujitsu.com
Tue Feb 22 09:41:07 CET 2022


Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 .../pidfd_send_signal/pidfd_send_signal01.c   |  5 +++-
 .../pidfd_send_signal/pidfd_send_signal02.c   | 25 +++++++++----------
 .../pidfd_send_signal/pidfd_send_signal03.c   |  7 +++++-
 3 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c
index 3d201aa9d..471585025 100644
--- a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c
+++ b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal01.c
@@ -3,7 +3,10 @@
  * Copyright (c) 2019 SUSE LLC
  * Author: Christian Amann <camann@suse.com>
  */
-/*
+
+/*\
+ * [Description]
+ *
  * Tests if the pidfd_send_signal syscall behaves
  * like rt_sigqueueinfo when a pointer to a siginfo_t
  * struct is passed.
diff --git a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal02.c b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal02.c
index 9600fc2f9..a3bf994f9 100644
--- a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal02.c
+++ b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal02.c
@@ -3,22 +3,21 @@
  * Copyright (c) 2019 SUSE LLC
  * Author: Christian Amann <camann@suse.com>
  */
-/*
+
+/*\
+ * [Description]
+ *
  * Tests basic error handling of the pidfd_send_signal
  * system call.
  *
- * 1) Pass invalid flag value to syscall (value chosen
- *    to be unlikely to collide with future extensions)
- *    -> EINVAL
- * 2) Pass a file descriptor that is corresponding to a
- *    regular file instead of a pid directory
- *    -> EBADF
- * 3) Pass a signal that is different from the one used
- *    to initialize the siginfo_t struct
- *    -> EINVAL
- * 4) Try to send signal to other process (init) with
- *    missing privileges
- *    -> EPERM
+ * - EINVAL Pass invalid flag value to syscall (value chosen
+ *   to be unlikely to collide with future extensions)
+ * - EBADF Pass a file descriptor that is corresponding to a
+ *   regular file instead of a pid directory
+ * - EINVAL Pass a signal that is different from the one used
+ *   to initialize the siginfo_t struct
+ * - EPERM Try to send signal to other process (init) with
+ *   missing privileges
  */
 
 #define _GNU_SOURCE
diff --git a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c
index fb61516d7..20d96b118 100644
--- a/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c
+++ b/testcases/kernel/syscalls/pidfd_send_signal/pidfd_send_signal03.c
@@ -3,13 +3,18 @@
  * Copyright (c) 2019 SUSE LLC
  * Author: Christian Amann <camann@suse.com>
  */
-/*
+
+/*\
+ * [Description]
+ *
  * This test checks if the pidfd_send_signal syscall wrongfully sends
  * a signal to a new process which inherited the PID of the actual
  * target process.
+ *
  * In order to do so it is necessary to start a process with a pre-
  * determined PID. This is accomplished by writing to the
  * /proc/sys/kernel/ns_last_pid file.
+ *
  * By utilizing this, this test forks two children with the same PID.
  * It is then checked, if the syscall will send a signal to the second
  * child using the pidfd of the first one.
-- 
2.31.1



More information about the ltp mailing list