Skip to contentSkip to conversation

syscalls/kill: Small cleanup

PATCH In review Ricardo B. Marlière via ltp 2 participants 7 messages May 15, 2025

lore
Share & tools
lore
#0 lore raw

v2 cover syscalls/kill: Small cleanup

---
Changes in v2:
- Squashed the removal of kill09 patch
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Ricardo B. Marlière (5):
syscalls/kill03: Fix test description metadata syscalls/kill05: Fix test description metadata syscalls/kill06: Fix test description metadata syscalls/kill11: Fix test description metadata
syscalls: Remove kill09

 runtest/syscalls                          |   1 -
 testcases/kernel/syscalls/kill/.gitignore |   1 -
 testcases/kernel/syscalls/kill/kill03.c   |  14 ++-
 testcases/kernel/syscalls/kill/kill05.c   |   9 +-
 testcases/kernel/syscalls/kill/kill06.c   |   8 +-
 testcases/kernel/syscalls/kill/kill09.c   | 198 ------------------------------
 testcases/kernel/syscalls/kill/kill11.c   |   9 +-
 7 files changed, 21 insertions(+), 219 deletions(-)

---
base-commit: 4a0e3a8fa7b592958f8e3cd366f63c78fba9f014
change-id: 20250514-conversions-kill-0867fa2c38b1

Best regards,

Signature · 5 lines
Ricardo B. Marlière <[email protected]>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

PATCH v2 1/5 syscalls/kill03: Fix test description metadata

From: Ricardo B. Marlière <[email protected]>

---
 testcases/kernel/syscalls/kill/kill03.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
testcases/kernel/syscalls/kill/kill03.c +8 -6
index 7d307067859d45ec64542e2c2b9e897fb6191b25..8d91cc615294c6cbfcc0bcfb8c0d1824da645e35 100644
@@ -1,15 +1,17 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) International Business Machines  Corp., 2001
- *
- * 1) kill() fails with errno set to EINVAL if given an invalid signal.
- * 2) kill() fails with errno set to ESRCH if given a non-existent pid.
- * 3) kill() fails with errno set to ESRCH if the given pid is INT_MIN.
- *
- * HISTORY
  *	07/2001 Ported by Wayne Boyer
  */
 
+/*\
+ * Verify that kill(2) fails with the correct error codes:
+ *
+ * - EINVAL if given an invalid signal.
+ * - ESRCH if given a non-existent pid.
+ * - ESRCH if the given pid is INT_MIN.
+ */
+
 #include <sys/types.h>
 #include <signal.h>
 #include <unistd.h>
Signature · 5 lines
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw

PATCH v2 2/5 syscalls/kill05: Fix test description metadata

In reply to Ricardo B. Marlière via ltp

From: Ricardo B. Marlière <[email protected]>

---
 testcases/kernel/syscalls/kill/kill05.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
testcases/kernel/syscalls/kill/kill05.c +4 -5
index 8ec71be49abcbb072b8744b5dee29da95428a64b..3c317e2fcb08c64531b597be37f39f2f8ab3d416 100644
@@ -2,8 +2,6 @@
 /*
  * Copyright (c) International Business Machines  Corp., 2001
  *
- * Test case to check that kill() fails when passed a pid owned by another user.
- *
  * HISTORY
  *	07/2001 Ported by Wayne Boyer
  *
@@ -12,9 +10,10 @@
  *        segfault in case of error with this syscall).
  *      - Fix deletion of IPC memory segment. Segment was not correctly
  *        deleted due to the change of uid during the test.
- *
- * RESTRICTIONS
- *	This test must be run as root.
+ */
+
+/*\
+ * Test case to check that kill() fails when passed a pid owned by another user.
  */
 
 #include <sys/wait.h>
Signature · 5 lines
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw

PATCH v2 3/5 syscalls/kill06: Fix test description metadata

In reply to Ricardo B. Marlière via ltp

From: Ricardo B. Marlière <[email protected]>

---
 testcases/kernel/syscalls/kill/kill06.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
testcases/kernel/syscalls/kill/kill06.c +4 -4
index 42003a684aecd9aaf975fc3d7e647efd4f5b4ecb..1386e1b773dd1aa609ebb747c66b35e0b0ac80e3 100644
@@ -1,12 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) International Business Machines  Corp., 2001
- *
+ *	07/2001 Ported by Wayne Boyer
+ */
+
+/*\
  * Test case to check the basic functionality of kill() when killing an
  * entire process group with a negative pid.
- *
- * HISTORY
- *	07/2001 Ported by Wayne Boyer
  */
 
 #include <sys/types.h>
Signature · 5 lines
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#4 lore raw

PATCH v2 4/5 syscalls/kill11: Fix test description metadata

In reply to Ricardo B. Marlière via ltp

From: Ricardo B. Marlière <[email protected]>

---
 testcases/kernel/syscalls/kill/kill11.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
testcases/kernel/syscalls/kill/kill11.c +5 -4
index 918f17f22101ee2683f9d90d5a530e2a50403c1b..3cf62feaed777c76d9fd39a48b255bf2da927716 100644
@@ -6,15 +6,16 @@
  *   Copyright (c) International Business Machines  Corp., 2002
  *   Copyright (c) Cyril Hrubis <[email protected]> 2014
  *
- * Test checks that when a child is killed by its parent with sig, it
- * returns the correct values(sig and core dump bit) to the waiting parent.
- *
  * RESTRICTIONS
  * The ulimit for core file size must be greater than 0.
  */
 
+/*\
+ * Test checks that when a child is killed by its parent with sig, it
+ * returns the correct values(sig and core dump bit) to the waiting parent.
+ */
+
 #define _GNU_SOURCE
-#include <errno.h>
 #include <sys/types.h>
 #include <signal.h>
 #include <stdlib.h>
Signature · 5 lines
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#5 lore raw

PATCH v2 5/5 syscalls: Remove kill09

In reply to Ricardo B. Marlière via ltp

From: Ricardo B. Marlière <[email protected]>

This test case is already covered by kill11.

---
 runtest/syscalls                          |   1 -
 testcases/kernel/syscalls/kill/.gitignore |   1 -
 testcases/kernel/syscalls/kill/kill09.c   | 198 ------------------------------
 3 files changed, 200 deletions(-)
runtest/syscalls +0 -1
index a7ad8837fdad80547dd85527bc8e50bdf381f6e0..e7bc7b27b604e0f0f69b6bad99955662c6c58a91 100644
@@ -699,7 +699,6 @@ kill05 kill05
 kill06 kill06
 kill07 kill07
 kill08 kill08
-kill09 kill09
 kill10 kill10
 kill11 kill11
 kill12 kill12
testcases/kernel/syscalls/kill/.gitignore +0 -1
index 810ed0200072dba7784a0020f91135235a7f291f..8188aa1083d92e25e654b9af32c15a4acbb6ab3d 100644
@@ -4,7 +4,6 @@
 /kill06
 /kill07
 /kill08
-/kill09
 /kill10
 /kill11
 /kill12
testcases/kernel/syscalls/kill/kill09.c deleted +0 -198

198 lines not on this page · raw message

Signature · 5 lines
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp