* [LTP] [PATCH v2 1/9] mem: shmt02: Make sure memory is no longer accessible after child exits
2025-06-30 13:13 [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API Ricardo B. Marlière via ltp
@ 2025-06-30 13:13 ` Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 2/9] mem: shmt03: Convert to new API Ricardo B. Marlière via ltp
` (8 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-06-30 13:13 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
The test description states: "Verify that the shared memory segment is
accessible as long as the process is still alive". Make sure to verify that
the segment is not accessible after the child process exits.
Fixes: 1e8516790063 ("mem: Convert shmt02 to new API")
Suggested-by: Andrea Cervesato <andrea.cervesato@suse.de>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
testcases/kernel/mem/shmt/shmt02.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/testcases/kernel/mem/shmt/shmt02.c b/testcases/kernel/mem/shmt/shmt02.c
index 16d99ac7a781c42cc282dd81af8895097b404435..52145af728ae357a2eae3195dbd7784a76666e11 100644
--- a/testcases/kernel/mem/shmt/shmt02.c
+++ b/testcases/kernel/mem/shmt/shmt02.c
@@ -27,21 +27,26 @@ static void run(void)
key = GETIPCKEY();
- shmid = SAFE_SHMGET(key, SHMSIZE, IPC_CREAT | 0666);
+ if (!SAFE_FORK()) {
+ shmid = SAFE_SHMGET(key, SHMSIZE, IPC_CREAT | 0666);
+ cp = SAFE_SHMAT(shmid, NULL, 0);
+ memcpy(cp, tst_rand_data, SHMSIZE);
+ SAFE_SHMCTL(shmid, IPC_RMID, NULL);
+ TST_EXP_EQ_LI(memcmp(cp, tst_rand_data, SHMSIZE), 0);
+ TST_CHECKPOINT_WAKE(0);
+ _exit(0);
+ }
+ TST_CHECKPOINT_WAIT(0);
+ tst_reap_children();
+ shmid = SAFE_SHMGET(key, SHMSIZE, IPC_CREAT | 0666);
cp = SAFE_SHMAT(shmid, NULL, 0);
- memcpy(cp, tst_rand_data, SHMSIZE);
-
+ TST_EXP_EXPR(memcmp(cp, tst_rand_data, SHMSIZE) < 0);
SAFE_SHMCTL(shmid, IPC_RMID, NULL);
-
- if (memcmp(cp, tst_rand_data, SHMSIZE) != 0) {
- tst_res(TFAIL, "Copied data changed after IPC_RMID");
- return;
- }
-
- tst_res(TPASS, "Copied data has been read back");
}
static struct tst_test test = {
.test_all = run,
+ .needs_checkpoints = 1,
+ .forks_child = 1,
};
--
2.50.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* [LTP] [PATCH v2 2/9] mem: shmt03: Convert to new API
2025-06-30 13:13 [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 1/9] mem: shmt02: Make sure memory is no longer accessible after child exits Ricardo B. Marlière via ltp
@ 2025-06-30 13:13 ` Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 3/9] mem: shmt04: " Ricardo B. Marlière via ltp
` (7 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-06-30 13:13 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
testcases/kernel/mem/shmt/Makefile | 3 +-
testcases/kernel/mem/shmt/shmt03.c | 133 ++++++-------------------------------
2 files changed, 24 insertions(+), 112 deletions(-)
diff --git a/testcases/kernel/mem/shmt/Makefile b/testcases/kernel/mem/shmt/Makefile
index a54bcfe190c192d81b1eeee47b9ec6a5fab24427..4c5f926c4e394445c7d2d7005c47414255670d40 100644
--- a/testcases/kernel/mem/shmt/Makefile
+++ b/testcases/kernel/mem/shmt/Makefile
@@ -26,6 +26,7 @@ LTPLIBS = newipc
include $(top_srcdir)/include/mk/testcases.mk
-shmt02: LTPLDLIBS = -lltpnewipc
+shmt02: LTPLDLIBS = -lltpnewipc
+shmt03: LTPLDLIBS = -lltpnewipc
include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/mem/shmt/shmt03.c b/testcases/kernel/mem/shmt/shmt03.c
index 08c27ce029721dea1db04025fa18ba19ad34f507..63f5a7b450b594aae4696cea2cd8031f5248d4aa 100644
--- a/testcases/kernel/mem/shmt/shmt03.c
+++ b/testcases/kernel/mem/shmt/shmt03.c
@@ -1,133 +1,44 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
- *
- * Copyright (c) International Business Machines Corp., 2002
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (c) International Business Machines Corp., 2002
+ * 12/20/2002 Port to LTP robbiew@us.ibm.com
+ * 06/30/2001 Port to Linux nsharoff@us.ibm.com
+ * Copyright (c) 2025 SUSE LLC Ricardo B. Marlière <rbm@suse.com>
*/
-/* 12/20/2002 Port to LTP robbiew@us.ibm.com */
-/* 06/30/2001 Port to Linux nsharoff@us.ibm.com */
-
-/*
- * NAME
- * shmt3
- *
- * CALLS
- * shmctl(2) shmget(2) shmat(2)
- *
- * ALGORITHM
+/*\
* Create one shared memory segment and attach it twice to the same process,
* at an address that is chosen by the system. After the first attach has
* completed, write to it and then do the second attach.
* Verify that the doubly attached segment contains the same data.
- *
*/
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <errno.h>
-
-/** LTP Port **/
-#include "test.h"
-
-char *TCID = "shmt03"; /* Test program identifier. */
-int TST_TOTAL = 4; /* Total number of test cases. */
-/**************/
+#include "tst_test.h"
+#include "tst_safe_sysv_ipc.h"
+#include "tst_rand_data.h"
+#include "libnewipc.h"
-#define K_1 1024
-#define SUCCESSFUL 1
+#define SHMSIZE 16
-int first_attach, second_attach;
-static int rm_shm(int);
-
-int main(void)
+static void run(void)
{
char *cp1, *cp2;
int shmid;
key_t key;
- key = (key_t) getpid();
- errno = 0;
-
-/*------------------------------------------------------------*/
-
- if ((shmid = shmget(key, 16 * K_1, IPC_CREAT | 0666)) < 0) {
- perror("shmget");
- tst_brkm(TFAIL, NULL,
- "shmget Failed: shmid = %d, errno = %d",
- shmid, errno);
- }
-
- tst_resm(TPASS, "shmget");
+ key = GETIPCKEY();
-/*------------------------------------------------------------*/
+ shmid = SAFE_SHMGET(key, SHMSIZE, IPC_CREAT | 0666);
- if ((cp1 = shmat(shmid, NULL, 0)) == (char *)-1) {
- perror("shmat");
- tst_resm(TFAIL, "shmat Failed: shmid = %d, errno = %d",
- shmid, errno);
- } else {
- *cp1 = '1';
- *(cp1 + 5 * K_1) = '2';
- first_attach = SUCCESSFUL;
- }
+ cp1 = SAFE_SHMAT(shmid, NULL, 0);
+ memcpy(cp1, tst_rand_data, SHMSIZE);
- tst_resm(TPASS, "1st shmat");
+ cp2 = SAFE_SHMAT(shmid, NULL, 0);
+ TST_EXP_EQ_LI(memcmp(cp2, tst_rand_data, SHMSIZE), 0);
-/*------------------------------------------------------------*/
-
- if ((cp2 = shmat(shmid, NULL, 0)) == (char *)-1) {
- perror("shmat");
- tst_resm(TFAIL, "shmat Failed: shmid = %d, errno = %d",
- shmid, errno);
- } else {
- second_attach = SUCCESSFUL;
- if ((*cp2 != '1' || *(cp2 + 5 * K_1) != '2') &&
- first_attach == SUCCESSFUL) {
- tst_resm(TFAIL, "Error: Shared memory contents");
- }
- }
-
- tst_resm(TPASS, "2nd shmat");
-
-/*---------------------------------------------------------------*/
-
- rm_shm(shmid);
-
- if (first_attach && second_attach) {
- if (*cp2 != '1' || *(cp2 + 5 * K_1) != '2' ||
- *cp1 != '1' || *(cp1 + 5 * K_1) != '2') {
- tst_resm(TFAIL, "Error: Shared memory contents");
- }
- }
-
- tst_resm(TPASS, "Correct shared memory contents");
-/*-----------------------------------------------------------------*/
- tst_exit();
+ SAFE_SHMCTL(shmid, IPC_RMID, NULL);
}
-static int rm_shm(int shmid)
-{
- if (shmctl(shmid, IPC_RMID, NULL) == -1) {
- perror("shmctl");
- tst_brkm(TFAIL,
- NULL,
- "shmctl Failed to remove: shmid = %d, errno = %d",
- shmid, errno);
- }
- return (0);
-}
+static struct tst_test test = {
+ .test_all = run,
+};
--
2.50.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* [LTP] [PATCH v2 3/9] mem: shmt04: Convert to new API
2025-06-30 13:13 [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 1/9] mem: shmt02: Make sure memory is no longer accessible after child exits Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 2/9] mem: shmt03: Convert to new API Ricardo B. Marlière via ltp
@ 2025-06-30 13:13 ` Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 4/9] mem: shmt05: " Ricardo B. Marlière via ltp
` (6 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-06-30 13:13 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
testcases/kernel/mem/shmt/Makefile | 1 +
testcases/kernel/mem/shmt/shmt04.c | 216 +++++++------------------------------
2 files changed, 37 insertions(+), 180 deletions(-)
diff --git a/testcases/kernel/mem/shmt/Makefile b/testcases/kernel/mem/shmt/Makefile
index 4c5f926c4e394445c7d2d7005c47414255670d40..e8317a8ae642b0f69ac57288cb86a316ec09c88d 100644
--- a/testcases/kernel/mem/shmt/Makefile
+++ b/testcases/kernel/mem/shmt/Makefile
@@ -28,5 +28,6 @@ include $(top_srcdir)/include/mk/testcases.mk
shmt02: LTPLDLIBS = -lltpnewipc
shmt03: LTPLDLIBS = -lltpnewipc
+shmt04: LTPLDLIBS = -lltpnewipc
include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
index c9a654e7d20aa9789b750f7f189585a2004ac5b7..6ae176d8dd1327e1f7da7fcae262399985eca5e7 100644
--- a/testcases/kernel/mem/shmt/shmt04.c
+++ b/testcases/kernel/mem/shmt/shmt04.c
@@ -1,197 +1,53 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
- *
- * Copyright (c) International Business Machines Corp., 2002
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (c) International Business Machines Corp., 2002
+ * 03/21/2003 enable ia64 Jacky.Malcles
+ * 12/20/2002 Port to LTP robbiew@us.ibm.com
+ * 06/30/2001 Port to Linux nsharoff@us.ibm.com
+ * Copyright (c) 2025 SUSE LLC Ricardo B. Marlière <rbm@suse.com>
*/
-/* 03/21/2003 enable ia64 Jacky.Malcles */
-/* 12/20/2002 Port to LTP robbiew@us.ibm.com */
-/* 06/30/2001 Port to Linux nsharoff@us.ibm.com */
-
-/*
- * NAME
- * shmt04
- *
- * CALLS
- * shmctl(2) shmget(2) shmat(2)
- *
- * ALGORITHM
+/*\
* Parent process forks a child. Child pauses until parent has created
* a shared memory segment, attached to it and written to it too. At that
* time child gets the shared memory segment id, attaches to it and
* verifies that its contents are the same as the contents of the
* parent attached segment.
- *
*/
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/wait.h>
-#include <sys/utsname.h>
-#include <signal.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/** LTP Port **/
-#include "test.h"
-
-char *TCID = "shmt04"; /* Test program identifier. */
-int TST_TOTAL = 2; /* Total number of test cases. */
-/**************/
-
-key_t key;
-sigset_t set;
-
-#define SIZE 16*1024
-
-int child();
-static int rm_shm(int);
-
-int main(void)
-{
- char *cp = NULL;
- int pid, pid1, shmid;
- int status;
-
- key = (key_t) getpid();
-
- sigemptyset(&set);
- sigaddset(&set, SIGUSR1);
- sigprocmask(SIG_BLOCK, &set, NULL);
-
- pid = fork();
- switch (pid) {
- case -1:
- tst_brkm(TBROK, NULL, "fork failed");
- case 0:
- child();
- }
-
-/*----------------------------------------------------------*/
-
- if ((shmid = shmget(key, SIZE, IPC_CREAT | 0666)) < 0) {
- perror("shmget");
- tst_resm(TFAIL, "Error: shmget: shmid = %d, errno = %d",
- shmid, errno);
- /*
- * kill the child if parent failed to do the attach
- */
- (void)kill(pid, SIGINT);
- } else {
- cp = shmat(shmid, NULL, 0);
-
- if (cp == (char *)-1) {
- perror("shmat");
- tst_resm(TFAIL,
- "Error: shmat: shmid = %d, errno = %d",
- shmid, errno);
-
-/* kill the child if parent failed to do the attch */
-
- kill(pid, SIGINT);
-
-/* remove shared memory segment */
+#include "tst_test.h"
+#include "tst_safe_sysv_ipc.h"
+#include "tst_rand_data.h"
+#include "libnewipc.h"
- rm_shm(shmid);
+#define SHMSIZE 16
- tst_exit();
- }
- *cp = 'A';
- *(cp + 1) = 'B';
- *(cp + 2) = 'C';
-
- kill(pid, SIGUSR1);
- while ((pid1 = wait(&status)) < 0 && (errno == EINTR)) ;
- if (pid1 != pid) {
- tst_resm(TFAIL, "Waited on the wrong child");
- tst_resm(TFAIL,
- "Error: wait_status = %d, pid1= %d", status,
- pid1);
- }
- }
-
- tst_resm(TPASS, "shmget,shmat");
-
-/*----------------------------------------------------------*/
-
- if (shmdt(cp) < 0) {
- tst_resm(TFAIL, "shmdt");
- }
-
- tst_resm(TPASS, "shmdt");
-
-/*----------------------------------------------------------*/
-
- rm_shm(shmid);
- tst_exit();
-}
-
-int child(void)
+static void run(void)
{
- int shmid, chld_pid;
char *cp;
- int sig;
-
- sigwait(&set, &sig);
- chld_pid = getpid();
-/*--------------------------------------------------------*/
-
- if ((shmid = shmget(key, SIZE, 0)) < 0) {
- perror("shmget:child process");
- tst_resm(TFAIL,
- "Error: shmget: errno=%d, shmid=%d, child_pid=%d",
- errno, shmid, chld_pid);
- } else {
- cp = shmat(shmid, NULL, 0);
-
- if (cp == (char *)-1) {
- perror("shmat:child process");
- tst_resm(TFAIL,
- "Error: shmat: errno=%d, shmid=%d, child_pid=%d",
- errno, shmid, chld_pid);
- } else {
- if (*cp != 'A') {
- tst_resm(TFAIL, "child: not A");
- }
- if (*(cp + 1) != 'B') {
- tst_resm(TFAIL, "child: not B");
- }
- if (*(cp + 2) != 'C') {
- tst_resm(TFAIL, "child: not C");
- }
- if (*(cp + 8192) != 0) {
- tst_resm(TFAIL, "child: not 0");
- }
- }
-
+ int shmid;
+ key_t key;
+
+ key = GETIPCKEY();
+
+ if (!SAFE_FORK()) {
+ TST_CHECKPOINT_WAIT(0);
+ shmid = SAFE_SHMGET(key, SHMSIZE, IPC_CREAT | 0666);
+ cp = SAFE_SHMAT(shmid, NULL, 0);
+ TST_EXP_EQ_LI(memcmp(cp, tst_rand_data, SHMSIZE), 0);
+ SAFE_SHMCTL(shmid, IPC_RMID, NULL);
+ _exit(0);
}
- tst_exit();
-}
-static int rm_shm(int shmid)
-{
- if (shmctl(shmid, IPC_RMID, NULL) == -1) {
- perror("shmctl");
- tst_brkm(TFAIL,
- NULL,
- "shmctl Failed to remove: shmid = %d, errno = %d",
- shmid, errno);
- }
- return (0);
+ shmid = SAFE_SHMGET(key, SHMSIZE, IPC_CREAT | 0666);
+ cp = SAFE_SHMAT(shmid, NULL, 0);
+ memcpy(cp, tst_rand_data, SHMSIZE);
+ TST_CHECKPOINT_WAKE(0);
+ tst_reap_children();
}
+
+static struct tst_test test = {
+ .test_all = run,
+ .needs_checkpoints = 1,
+ .forks_child = 1,
+};
--
2.50.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* [LTP] [PATCH v2 4/9] mem: shmt05: Convert to new API
2025-06-30 13:13 [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API Ricardo B. Marlière via ltp
` (2 preceding siblings ...)
2025-06-30 13:13 ` [LTP] [PATCH v2 3/9] mem: shmt04: " Ricardo B. Marlière via ltp
@ 2025-06-30 13:13 ` Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 5/9] mem: shmt06: Remove in favor of shmt04 Ricardo B. Marlière via ltp
` (5 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-06-30 13:13 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
testcases/kernel/mem/shmt/Makefile | 1 +
testcases/kernel/mem/shmt/shmt05.c | 131 +++++++------------------------------
2 files changed, 25 insertions(+), 107 deletions(-)
diff --git a/testcases/kernel/mem/shmt/Makefile b/testcases/kernel/mem/shmt/Makefile
index e8317a8ae642b0f69ac57288cb86a316ec09c88d..3414eadc996d45799c19f98568641189c5fc60e3 100644
--- a/testcases/kernel/mem/shmt/Makefile
+++ b/testcases/kernel/mem/shmt/Makefile
@@ -29,5 +29,6 @@ include $(top_srcdir)/include/mk/testcases.mk
shmt02: LTPLDLIBS = -lltpnewipc
shmt03: LTPLDLIBS = -lltpnewipc
shmt04: LTPLDLIBS = -lltpnewipc
+shmt05: LTPLDLIBS = -lltpnewipc
include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/mem/shmt/shmt05.c b/testcases/kernel/mem/shmt/shmt05.c
index 430db20cd8d0745b0bf5a81b3601e29edc02a84c..e8b5d9eb53c5a5e56e550640fd1debf223573b84 100644
--- a/testcases/kernel/mem/shmt/shmt05.c
+++ b/testcases/kernel/mem/shmt/shmt05.c
@@ -1,126 +1,43 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
- *
- * Copyright (c) International Business Machines Corp., 2002
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (c) International Business Machines Corp., 2002
+ * 12/20/2002 Port to LTP robbiew@us.ibm.com
+ * 06/30/2001 Port to Linux nsharoff@us.ibm.com
+ * Copyright (c) 2025 SUSE LLC Ricardo B. Marlière <rbm@suse.com>
*/
-/* 12/20/2002 Port to LTP robbiew@us.ibm.com */
-/* 06/30/2001 Port to Linux nsharoff@us.ibm.com */
-
-/*
- * NAME
- * shmt05
- *
- * CALLS
- * shmctl(2) shmget(2) shmat(2)
- *
- * ALGORITHM
+/*\
* Create two shared memory segments and attach them to the same process
* at two different addresses. The addresses DO BUMP into each other.
* The second attach should Fail.
- *
*/
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/ipc.h>
+#include "tst_test.h"
+#include "tst_safe_sysv_ipc.h"
+#include "libnewipc.h"
#include <sys/shm.h>
-#include <sys/utsname.h>
-#include <errno.h>
-#include <time.h>
-
-/** LTP Port **/
-#include "test.h"
-
-char *TCID = "shmt05"; /* Test program identifier. */
-int TST_TOTAL = 2; /* Total number of test cases. */
-/**************/
-key_t key[2];
+#define SHMSIZE 16
-#define SIZE (2*SHMLBA)
-
-static int rm_shm(int);
-
-int main(void)
+static void run(void)
{
int shmid, shmid1;
- char *cp, *cp1;
-
- srand48((getpid() << 16) + (unsigned)time(NULL));
-
- key[0] = (key_t) lrand48();
- key[1] = (key_t) lrand48();
+ char *cp;
+ key_t key[2];
- cp = NULL;
- cp1 = NULL;
+ key[0] = GETIPCKEY();
+ key[1] = GETIPCKEY();
-/*--------------------------------------------------------*/
+ shmid = SAFE_SHMGET(key[0], SHMSIZE, IPC_CREAT | 0666);
+ cp = SAFE_SHMAT(shmid, NULL, 0);
- if ((shmid = shmget(key[0], SIZE, IPC_CREAT | 0666)) < 0) {
- perror("shmget");
- tst_resm(TFAIL,
- "Error: shmget: shmid = %d, errno = %d\n",
- shmid, errno);
- } else {
- cp = shmat(shmid, NULL, 0);
+ shmid1 = SAFE_SHMGET(key[1], SHMSIZE, IPC_CREAT | 0666);
+ TST_EXP_FAIL((long)shmat(shmid, cp + (SHMSIZE / 2), 0), EINVAL);
- if (cp == (char *)-1) {
- tst_resm(TFAIL, "shmat");
- rm_shm(shmid);
- }
- }
-
- tst_resm(TPASS, "shmget & shmat");
-
-/*--------------------------------------------------------*/
-
- if ((shmid1 = shmget(key[1], SIZE, IPC_CREAT | 0666)) < 0) {
- perror("shmget2");
- tst_resm(TFAIL,
- "Error: shmget: shmid1 = %d, errno = %d\n",
- shmid1, errno);
- } else {
- cp1 = shmat(shmid1, cp + (SIZE / 2), 0);
- if (cp1 != (char *)-1) {
- perror("shmat");
- tst_resm(TFAIL,
- "Error: shmat: shmid1 = %d, addr= %p, errno = %d\n",
- shmid1, cp1, errno);
- } else {
- tst_resm(TPASS, "2nd shmget & shmat");
- }
- }
-
-/*------------------------------------------------------*/
-
- rm_shm(shmid);
- rm_shm(shmid1);
-
- tst_exit();
+ SAFE_SHMCTL(shmid, IPC_RMID, NULL);
+ SAFE_SHMCTL(shmid1, IPC_RMID, NULL);
}
-static int rm_shm(int shmid)
-{
- if (shmctl(shmid, IPC_RMID, NULL) == -1) {
- perror("shmctl");
- tst_brkm(TFAIL,
- NULL,
- "shmctl Failed to remove: shmid = %d, errno = %d\n",
- shmid, errno);
- }
- return (0);
-}
+static struct tst_test test = {
+ .test_all = run,
+};
--
2.50.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* [LTP] [PATCH v2 5/9] mem: shmt06: Remove in favor of shmt04
2025-06-30 13:13 [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API Ricardo B. Marlière via ltp
` (3 preceding siblings ...)
2025-06-30 13:13 ` [LTP] [PATCH v2 4/9] mem: shmt05: " Ricardo B. Marlière via ltp
@ 2025-06-30 13:13 ` Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 6/9] mem: shmt07: Convert to new API Ricardo B. Marlière via ltp
` (4 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-06-30 13:13 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
The shmt06 is almost a duplicate of shmt04, simply add its requirement and
delete it.
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
runtest/mm | 1 -
testcases/kernel/mem/.gitignore | 1 -
testcases/kernel/mem/shmt/shmt04.c | 6 +
testcases/kernel/mem/shmt/shmt06.c | 220 -------------------------------------
4 files changed, 6 insertions(+), 222 deletions(-)
diff --git a/runtest/mm b/runtest/mm
index 5566a77425c6c6e426115b9cfd68b383009dbbb1..41d624ad86fc354cc1284bbcee192420a93fa93a 100644
--- a/runtest/mm
+++ b/runtest/mm
@@ -28,7 +28,6 @@ shmt02 shmt02
shmt03 shmt03
shmt04 shmt04
shmt05 shmt05
-shmt06 shmt06
shmt07 shmt07
shmt08 shmt08
shmt09 shmt09
diff --git a/testcases/kernel/mem/.gitignore b/testcases/kernel/mem/.gitignore
index e24e96001731a694cf7d6083af36e31f1ac72ed1..b4455de51d6d6a9cc3d8b7ff392fc3ea9e95890a 100644
--- a/testcases/kernel/mem/.gitignore
+++ b/testcases/kernel/mem/.gitignore
@@ -89,7 +89,6 @@
/shmt/shmt03
/shmt/shmt04
/shmt/shmt05
-/shmt/shmt06
/shmt/shmt07
/shmt/shmt08
/shmt/shmt09
diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
index 6ae176d8dd1327e1f7da7fcae262399985eca5e7..64d93057c86749fe20f06f82f3d9b4396eba29a2 100644
--- a/testcases/kernel/mem/shmt/shmt04.c
+++ b/testcases/kernel/mem/shmt/shmt04.c
@@ -35,6 +35,12 @@ static void run(void)
shmid = SAFE_SHMGET(key, SHMSIZE, IPC_CREAT | 0666);
cp = SAFE_SHMAT(shmid, NULL, 0);
TST_EXP_EQ_LI(memcmp(cp, tst_rand_data, SHMSIZE), 0);
+ /*
+ * Attach the segment to a different address
+ * and verify it's contents again.
+ */
+ cp = SAFE_SHMAT(shmid, NULL, 0);
+ TST_EXP_EQ_LI(memcmp(cp, tst_rand_data, SHMSIZE), 0);
SAFE_SHMCTL(shmid, IPC_RMID, NULL);
_exit(0);
}
diff --git a/testcases/kernel/mem/shmt/shmt06.c b/testcases/kernel/mem/shmt/shmt06.c
deleted file mode 100644
index e88ac45c98cd01a5643ab996a7a2f9eb73eb7e9d..0000000000000000000000000000000000000000
--- a/testcases/kernel/mem/shmt/shmt06.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2002
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/* 12/20/2002 Port to LTP robbiew@us.ibm.com */
-/* 06/30/2001 Port to Linux nsharoff@us.ibm.com */
-
-/*
- * NAME
- * shmt06
- *
- * CALLS
- * shmctl(2) shmget(2) shmat(2)
- *
- * ALGORITHM
- * Parent process forks a child. Child pauses until parent has created
- * a shared memory segment, attached to it and written to it too. At that
- * time child gets the shared memory segment id, attaches to it at two
- * different addresses than the parents and verifies that their contents
- * are the same as the contents of the parent attached segment.
- *
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/utsname.h>
-#include <signal.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#define SIZE 16*1024
-
-/** LTP Port **/
-#include "test.h"
-
-char *TCID = "shmt06"; /* Test program identifier. */
-int TST_TOTAL = 2; /* Total number of test cases. */
-/**************/
-
-key_t key;
-sigset_t set;
-
-int child();
-static int rm_shm(int);
-
-int main(void)
-{
- char *cp = NULL;
- int pid, pid1, shmid;
- int status;
-
- key = (key_t) getpid();
-
- sigemptyset(&set);
- sigaddset(&set, SIGUSR1);
- sigprocmask(SIG_BLOCK, &set, NULL);
-
- pid = fork();
- switch (pid) {
- case -1:
- tst_brkm(TBROK, NULL, "fork failed");
- case 0:
- child();
- }
-
-/*------------------------------------------------------*/
-
- if ((shmid = shmget(key, SIZE, IPC_CREAT | 0666)) < 0) {
- perror("shmget");
- tst_resm(TFAIL, "Error: shmget: shmid = %d, errno = %d",
- shmid, errno);
- /*
- * kill the child if parent failed to do the attach
- */
- (void)kill(pid, SIGINT);
- } else {
- cp = shmat(shmid, NULL, 0);
-
- if (cp == (char *)-1) {
- perror("shmat");
- tst_resm(TFAIL,
- "Error: shmat: shmid = %d, errno = %d",
- shmid, errno);
-
- /* kill the child if parent failed to do the attch */
-
- kill(pid, SIGINT);
-
- /* remove shared memory segment */
-
- rm_shm(shmid);
-
- tst_exit();
- }
- *cp = 'A';
- *(cp + 1) = 'B';
- *(cp + 2) = 'C';
-
- kill(pid, SIGUSR1);
- while ((pid1 = wait(&status)) < 0 && (errno == EINTR)) ;
- if (pid1 != pid) {
- tst_resm(TFAIL, "Waited on the wrong child");
- tst_resm(TFAIL,
- "Error: wait_status = %d, pid1= %d", status,
- pid1);
- }
- }
-
- tst_resm(TPASS, "shmget,shmat");
-
-/*---------------------------------------------------------------*/
-
- if (shmdt(cp) < 0) {
- tst_resm(TFAIL, "shmdt");
- }
-
- tst_resm(TPASS, "shmdt");
-
-/*-------------------------------------------------------------*/
-
- rm_shm(shmid);
- tst_exit();
-}
-
-int child(void)
-{
- int shmid, chld_pid;
- char *cp;
- int sig;
-
- sigwait(&set, &sig);
- chld_pid = getpid();
-
- if ((shmid = shmget(key, SIZE, 0)) < 0) {
- perror("shmget:child process");
- tst_resm(TFAIL,
- "Error: shmget: errno=%d, shmid=%d, child_pid=%d",
- errno, shmid, chld_pid);
- } else {
- cp = shmat(shmid, NULL, 0);
-
- if (cp == (char *)-1) {
- perror("shmat:child process");
- tst_resm(TFAIL,
- "Error: shmat: errno=%d, shmid=%d, child_pid=%d",
- errno, shmid, chld_pid);
- } else {
- if (*cp != 'A') {
- tst_resm(TFAIL, "child: not A");
- }
- if (*(cp + 1) != 'B') {
- tst_resm(TFAIL, "child: not B");
- }
- if (*(cp + 2) != 'C') {
- tst_resm(TFAIL, "child: not C");
- }
- if (*(cp + 8192) != 0) {
- tst_resm(TFAIL, "child: not 0");
- }
- }
-
- /*
- * Attach the segment to a different addresse
- * and verify it's contents again.
- */
- cp = shmat(shmid, NULL, 0);
-
- if (cp == (char *)-1) {
- perror("shmat:child process");
- tst_resm(TFAIL,
- "Error: shmat: errno=%d, shmid=%d, child_pid=%d",
- errno, shmid, chld_pid);
- } else {
- if (*cp != 'A') {
- tst_resm(TFAIL, "child: not A");
- }
- if (*(cp + 1) != 'B') {
- tst_resm(TFAIL, "child: not B");
- }
- if (*(cp + 2) != 'C') {
- tst_resm(TFAIL, "child: not C");
- }
- if (*(cp + 8192) != 0) {
- tst_resm(TFAIL, "child: not 0");
- }
- }
- }
- tst_exit();
-}
-
-static int rm_shm(int shmid)
-{
- if (shmctl(shmid, IPC_RMID, NULL) == -1) {
- perror("shmctl");
- tst_brkm(TFAIL,
- NULL,
- "shmctl Failed to remove: shmid = %d, errno = %d",
- shmid, errno);
- }
- return (0);
-}
--
2.50.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* [LTP] [PATCH v2 6/9] mem: shmt07: Convert to new API
2025-06-30 13:13 [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API Ricardo B. Marlière via ltp
` (4 preceding siblings ...)
2025-06-30 13:13 ` [LTP] [PATCH v2 5/9] mem: shmt06: Remove in favor of shmt04 Ricardo B. Marlière via ltp
@ 2025-06-30 13:13 ` Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 7/9] mem: shmt08: " Ricardo B. Marlière via ltp
` (3 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-06-30 13:13 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
testcases/kernel/mem/shmt/Makefile | 1 +
testcases/kernel/mem/shmt/shmt07.c | 138 ++++++++-----------------------------
2 files changed, 29 insertions(+), 110 deletions(-)
diff --git a/testcases/kernel/mem/shmt/Makefile b/testcases/kernel/mem/shmt/Makefile
index 3414eadc996d45799c19f98568641189c5fc60e3..2cd640a300e53c2dd2cccbe14701577987d0e10b 100644
--- a/testcases/kernel/mem/shmt/Makefile
+++ b/testcases/kernel/mem/shmt/Makefile
@@ -30,5 +30,6 @@ shmt02: LTPLDLIBS = -lltpnewipc
shmt03: LTPLDLIBS = -lltpnewipc
shmt04: LTPLDLIBS = -lltpnewipc
shmt05: LTPLDLIBS = -lltpnewipc
+shmt07: LTPLDLIBS = -lltpnewipc
include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/mem/shmt/shmt07.c b/testcases/kernel/mem/shmt/shmt07.c
index 064343f5d827d3470353771df42d37006a2c8779..962479e753f41fd92b1eb96f046b3535b11b056e 100644
--- a/testcases/kernel/mem/shmt/shmt07.c
+++ b/testcases/kernel/mem/shmt/shmt07.c
@@ -1,131 +1,49 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
- *
- * Copyright (c) International Business Machines Corp., 2002
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (c) International Business Machines Corp., 2002
+ * 12/20/2002 Port to LTP robbiew@us.ibm.com
+ * 06/30/2001 Port to Linux nsharoff@us.ibm.com
+ * Copyright (c) 2025 SUSE LLC Ricardo B. Marlière <rbm@suse.com>
*/
-/* 12/20/2002 Port to LTP robbiew@us.ibm.com */
-/* 06/30/2001 Port to Linux nsharoff@us.ibm.com */
-
-/*
- * NAME
- * shmt07
- *
- * CALLS
- * shmctl(2) shmget(2) shmat(2)
- *
- * ALGORITHM
+/*\
* Create and attach a shared memory segment, write to it
* and then fork a child. The child verifies that the shared memory segment
* that it inherited from the parent contains the same data that was originally
* written to it by the parent.
- *
*/
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/utsname.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#define SIZE 16*1024
+#include "tst_test.h"
+#include "tst_safe_sysv_ipc.h"
+#include "tst_rand_data.h"
+#include "libnewipc.h"
-/** LTP Port **/
-#include "test.h"
+#define SHMSIZE 16
-char *TCID = "shmt07"; /* Test program identifier. */
-int TST_TOTAL = 2; /* Total number of test cases. */
-/**************/
+#include "tst_test.h"
-int child();
-static int rm_shm(int);
-
-int main(void)
+static void run(void)
{
- char *cp = NULL;
- int shmid, pid, status;
+ char *cp;
+ int shmid;
key_t key;
- key = (key_t) getpid();
-
-/*---------------------------------------------------------*/
-
- errno = 0;
-
- if ((shmid = shmget(key, SIZE, IPC_CREAT | 0666)) < 0) {
- perror("shmget");
- tst_brkm(TFAIL, NULL,
- "Error: shmget: shmid = %d, errno = %d",
- shmid, errno);
- }
- cp = shmat(shmid, NULL, 0);
-
- if (cp == (char *)-1) {
- perror("shmat");
- tst_resm(TFAIL,
- "Error: shmat: shmid = %d, errno = %d",
- shmid, errno);
- rm_shm(shmid);
- tst_exit();
- }
-
- *cp = '1';
- *(cp + 1) = '2';
-
- tst_resm(TPASS, "shmget,shmat");
+ key = GETIPCKEY();
-/*-------------------------------------------------------*/
+ shmid = SAFE_SHMGET(key, SHMSIZE, IPC_CREAT | 0666);
+ cp = SAFE_SHMAT(shmid, NULL, 0);
+ memcpy(cp, tst_rand_data, SHMSIZE);
- pid = fork();
- switch (pid) {
- case -1:
- tst_brkm(TBROK, NULL, "fork failed");
-
- case 0:
- if (*cp != '1') {
- tst_resm(TFAIL, "Error: not 1");
- }
- if (*(cp + 1) != '2') {
- tst_resm(TFAIL, "Error: not 2");
- }
- tst_exit();
+ if (!SAFE_FORK()) {
+ TST_EXP_EQ_LI(memcmp(cp, tst_rand_data, SHMSIZE), 0);
+ _exit(0);
}
- /* parent */
- while (wait(&status) < 0 && errno == EINTR) ;
-
- tst_resm(TPASS, "cp & cp+1 correct");
-
-/*-----------------------------------------------------------*/
- rm_shm(shmid);
- tst_exit();
+ SAFE_WAIT(NULL);
+ SAFE_SHMCTL(shmid, IPC_RMID, NULL);
}
-static int rm_shm(int shmid)
-{
- if (shmctl(shmid, IPC_RMID, NULL) == -1) {
- perror("shmctl");
- tst_brkm(TFAIL,
- NULL,
- "shmctl Failed to remove: shmid = %d, errno = %d",
- shmid, errno);
- }
- return (0);
-}
+static struct tst_test test = {
+ .test_all = run,
+ .forks_child = 1,
+};
--
2.50.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* [LTP] [PATCH v2 7/9] mem: shmt08: Convert to new API
2025-06-30 13:13 [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API Ricardo B. Marlière via ltp
` (5 preceding siblings ...)
2025-06-30 13:13 ` [LTP] [PATCH v2 6/9] mem: shmt07: Convert to new API Ricardo B. Marlière via ltp
@ 2025-06-30 13:13 ` Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 8/9] mem: shmt09: " Ricardo B. Marlière via ltp
` (2 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-06-30 13:13 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
testcases/kernel/mem/shmt/Makefile | 1 +
testcases/kernel/mem/shmt/shmt08.c | 125 ++++++++-----------------------------
2 files changed, 26 insertions(+), 100 deletions(-)
diff --git a/testcases/kernel/mem/shmt/Makefile b/testcases/kernel/mem/shmt/Makefile
index 2cd640a300e53c2dd2cccbe14701577987d0e10b..ef34f23e6cdf33ef0e6817d6ab23d30535255945 100644
--- a/testcases/kernel/mem/shmt/Makefile
+++ b/testcases/kernel/mem/shmt/Makefile
@@ -31,5 +31,6 @@ shmt03: LTPLDLIBS = -lltpnewipc
shmt04: LTPLDLIBS = -lltpnewipc
shmt05: LTPLDLIBS = -lltpnewipc
shmt07: LTPLDLIBS = -lltpnewipc
+shmt08: LTPLDLIBS = -lltpnewipc
include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/mem/shmt/shmt08.c b/testcases/kernel/mem/shmt/shmt08.c
index 2c3ae9d54ed0c927600e1f5b5b071d8c112ebfbc..9fb2f6b2206a4e68918f658059d2eebc36cddbae 100644
--- a/testcases/kernel/mem/shmt/shmt08.c
+++ b/testcases/kernel/mem/shmt/shmt08.c
@@ -1,117 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
- *
- * Copyright (c) International Business Machines Corp., 2002
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (c) International Business Machines Corp., 2002
+ * 12/20/2002 Port to LTP robbiew@us.ibm.com
+ * 06/30/2001 Port to Linux nsharoff@us.ibm.com
+ * Copyright (c) 2025 SUSE LLC Ricardo B. Marlière <rbm@suse.com>
*/
-/* 12/20/2002 Port to LTP robbiew@us.ibm.com */
-/* 06/30/2001 Port to Linux nsharoff@us.ibm.com */
-
-/*
- * NAME
- * shmt08
- *
- * CALLS
- * shmctl(2) shmget(2) shmat(2) shmdt(2)
- *
- * ALGORITHM
+/*\
* Create a shared memory segment. Attach it twice at an address
- * that is provided by the system. Detach the previously attached
+ * that is provided by the system. Detach the previously attached
* segments from the process.
- *
*/
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <errno.h>
-
-#define K_1 1024
-
-/** LTP Port **/
-#include "test.h"
+#include "tst_test.h"
+#include "tst_safe_sysv_ipc.h"
+#include "libnewipc.h"
-char *TCID = "shmt08"; /* Test program identifier. */
-int TST_TOTAL = 2; /* Total number of test cases. */
-/**************/
+#define SHMSIZE 16
-key_t key;
-
-static int rm_shm(int);
-
-int main(void)
+static void run(void)
{
- char *cp = NULL, *cp1 = NULL;
+ char *cp, *cp1;
int shmid;
+ key_t key;
- key = (key_t) getpid();
- errno = 0;
-/*-------------------------------------------------------*/
-
- if ((shmid = shmget(key, 24 * K_1, IPC_CREAT | 0666)) < 0) {
- perror("shmget");
- tst_brkm(TFAIL, NULL,
- "Error: shmget: shmid = %d, errno = %d\n",
- shmid, errno);
- }
+ key = GETIPCKEY();
- cp = shmat(shmid, NULL, 0);
- if (cp == (char *)-1) {
- tst_resm(TFAIL, "shmat1 Failed");
- rm_shm(shmid);
- tst_exit();
- }
+ shmid = SAFE_SHMGET(key, SHMSIZE, IPC_CREAT | 0666);
+ cp = SAFE_SHMAT(shmid, NULL, 0);
+ cp1 = SAFE_SHMAT(shmid, NULL, 0);
- cp1 = shmat(shmid, NULL, 0);
- if (cp1 == (char *)-1) {
- perror("shmat2");
- rm_shm(shmid);
- tst_exit();
- }
+ SAFE_SHMDT(cp);
+ SAFE_SHMDT(cp1);
+ SAFE_SHMCTL(shmid, IPC_RMID, NULL);
- tst_resm(TPASS, "shmget,shmat");
-
-/*--------------------------------------------------------*/
-
- if (shmdt(cp) < 0) {
- perror("shmdt2");
- tst_resm(TFAIL, "shmdt:cp");
- }
-
- if (shmdt(cp1) < 0) {
- perror("shmdt1");
- tst_resm(TFAIL, "shmdt:cp1");
- }
-
- tst_resm(TPASS, "shmdt");
-
-/*---------------------------------------------------------*/
- rm_shm(shmid);
- tst_exit();
+ tst_res(TPASS, "Attached and detached twice");
}
-static int rm_shm(int shmid)
-{
- if (shmctl(shmid, IPC_RMID, NULL) == -1) {
- perror("shmctl");
- tst_brkm(TFAIL,
- NULL,
- "shmctl Failed to remove: shmid = %d, errno = %d\n",
- shmid, errno);
- }
- return (0);
-}
+static struct tst_test test = {
+ .test_all = run,
+};
--
2.50.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* [LTP] [PATCH v2 8/9] mem: shmt09: Convert to new API
2025-06-30 13:13 [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API Ricardo B. Marlière via ltp
` (6 preceding siblings ...)
2025-06-30 13:13 ` [LTP] [PATCH v2 7/9] mem: shmt08: " Ricardo B. Marlière via ltp
@ 2025-06-30 13:13 ` Ricardo B. Marlière via ltp
2025-06-30 13:13 ` [LTP] [PATCH v2 9/9] mem: shmt10: " Ricardo B. Marlière via ltp
2025-07-01 3:19 ` [LTP] [PATCH v2 0/9] mem: shmt: " Li Wang via ltp
9 siblings, 0 replies; 12+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-06-30 13:13 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
testcases/kernel/mem/shmt/Makefile | 1 +
testcases/kernel/mem/shmt/shmt09.c | 210 +++++++++----------------------------
2 files changed, 48 insertions(+), 163 deletions(-)
diff --git a/testcases/kernel/mem/shmt/Makefile b/testcases/kernel/mem/shmt/Makefile
index ef34f23e6cdf33ef0e6817d6ab23d30535255945..7fe4e75b567367e6c4b0978dec831ca268e99567 100644
--- a/testcases/kernel/mem/shmt/Makefile
+++ b/testcases/kernel/mem/shmt/Makefile
@@ -32,5 +32,6 @@ shmt04: LTPLDLIBS = -lltpnewipc
shmt05: LTPLDLIBS = -lltpnewipc
shmt07: LTPLDLIBS = -lltpnewipc
shmt08: LTPLDLIBS = -lltpnewipc
+shmt09: LTPLDLIBS = -lltpnewipc
include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/mem/shmt/shmt09.c b/testcases/kernel/mem/shmt/shmt09.c
index 347244115909536bad568ec8394a95c46b69889c..fb40498e6a62a0b85d08a9f589f392f7726746d9 100644
--- a/testcases/kernel/mem/shmt/shmt09.c
+++ b/testcases/kernel/mem/shmt/shmt09.c
@@ -1,199 +1,83 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
- *
- * Copyright (c) International Business Machines Corp., 2002
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (c) International Business Machines Corp., 2002
+ * 12/20/2002 Port to LTP robbiew@us.ibm.com
+ * 06/30/2001 Port to Linux nsharoff@us.ibm.com
+ * Copyright (c) 2025 SUSE LLC Ricardo B. Marlière <rbm@suse.com>
*/
-/* 12/20/2002 Port to LTP robbiew@us.ibm.com */
-/* 06/30/2001 Port to Linux nsharoff@us.ibm.com */
-
-/*
- * NAME
- * shmt09
- *
- * CALLS
- * sbrk(2) shmctl(2) shmget(2)
- *
- * ALGORITHM
+/*\
* Create a shared memory segment and attach at the default address.
* Increase the size of the data segment.
* Attach at an address that is less than the break value: should FAIL.
* decrease the size of the data segment.
* Attach at 4K past the break value: should SUCCEED.
* Sbrk() past the attached segment: should FAIL.
- *
*/
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/ipc.h>
#include <sys/shm.h>
-#include <errno.h>
-#include <unistd.h>
-#define K_1 1024
+#include "tst_test.h"
+#include "tst_safe_sysv_ipc.h"
+#include "libnewipc.h"
+#include "tst_test_macros.h"
-#define SHMBYTES (SHMLBA - 1)
+#define SHMSIZE 16
+#define SHMBYTES (SHMLBA - 1)
#define SHMALIGN(p) (((unsigned long)(p) + SHMBYTES) & ~SHMBYTES)
-/** LTP Port **/
-#include "test.h"
-
-char *TCID = "shmt09"; /* Test program identifier. */
-int TST_TOTAL = 4; /* Total number of test cases. */
-/**************/
-
#ifdef __ia64__
-#define INCREMENT 8388608 /* 8Mb */
-#elif defined (__mips__) || defined (__hppa__) || defined (__sparc__)
-#define INCREMENT 262144 /* 256Kb */
-#elif defined __sh__ || defined (__arm__) || defined(__aarch64__)
-#define INCREMENT 16384 /* 16kb */
+#define INCREMENT 8388608 /* 8Mb */
+#elif defined(__mips__) || defined(__hppa__) || defined(__sparc__)
+#define INCREMENT 262144 /* 256Kb */
+#elif defined __sh__ || defined(__arm__) || defined(__aarch64__)
+#define INCREMENT 16384 /* 16kb */
#else
-#define INCREMENT SHMLBA
+#define INCREMENT SHMLBA
#endif
-static int rm_shm(int);
-
-int main(void)
+static void run(void)
{
- char *c1 = NULL, *c2 = NULL, *c3 = NULL;
void *vp;
int shmid;
key_t key;
- key = (key_t) getpid();
-
-/*-----------------------------------------------------------*/
-
- if ((unsigned long)sbrk(16384) >= (-4095UL)) {
- perror("sbrk");
- tst_brkm(TFAIL, NULL, "Error: sbrk failed, errno = %d",
- errno);
- }
-
- if ((unsigned long)sbrk(-4097) >= (-4095UL)) {
- perror("sbrk");
- tst_brkm(TFAIL, NULL, "Error: sbrk failed, errno = %d",
- errno);
- }
-
- if ((shmid = shmget(key, 10 * K_1, IPC_CREAT | 0666)) < 0) {
- perror("shmget");
- tst_brkm(TFAIL,
- NULL,
- "Error: shmget Failed, shmid = %d, errno = %d",
- shmid, errno);
- }
-
- c1 = shmat(shmid, NULL, 0);
- if (c1 == (char *)-1) {
- perror("shmat");
- tst_resm(TFAIL,
- "Error: shmat Failed, shmid = %d, errno = %d",
- shmid, errno);
- rm_shm(shmid);
- tst_exit();
- }
-
- tst_resm(TPASS, "sbrk, sbrk, shmget, shmat");
-
-/*--------------------------------------------------------*/
-
- if ((unsigned long)sbrk(32 * K_1) >= (-4095UL)) {
- perror("sbrk");
- tst_resm(TFAIL, "Error: sbrk failed, errno = %d", errno);
- rm_shm(shmid);
- tst_exit();
- }
- vp = (void *)((char *)sbrk(0) - 2 * K_1);
- c2 = shmat(shmid, vp, 0);
- if (c2 != (char *)-1) {
- tst_resm(TFAIL,
- "ERROR: shmat: succeeded!: shmid = %d, shmaddr = %p, "
- "att_addr = %p", shmid, c2, vp);
- rm_shm(shmid);
- tst_exit();
- }
-
- tst_resm(TPASS, "sbrk, shmat");
-
-/*---------------------------------------------------------*/
-
- if ((unsigned long)sbrk(-16000) >= (-4095UL)) {
- perror("sbrk");
- tst_resm(TFAIL, "Error: sbrk failed, errno = %d", errno);
- rm_shm(shmid);
- tst_exit();
- }
+ key = GETIPCKEY();
+
+ if ((unsigned long)sbrk(16384) >= (-4095UL))
+ tst_brk(TFAIL, "Error: sbrk failed, errno = %d", errno);
+
+ if ((unsigned long)sbrk(-4097) >= (-4095UL))
+ tst_brk(TFAIL, "Error: sbrk failed, errno = %d", errno);
+
+ shmid = SAFE_SHMGET(key, 10 * SHMSIZE, IPC_CREAT | 0666);
+ SAFE_SHMAT(shmid, NULL, 0);
+
+ if ((unsigned long)sbrk(32 * SHMSIZE) >= (-4095UL))
+ tst_brk(TFAIL, "Error: sbrk failed, errno = %d", errno);
+
+ vp = (void *)((char *)sbrk(0) - 2 * SHMSIZE);
+ TST_EXP_FAIL((long)shmat(shmid, vp, 0), EINVAL);
+
+ if ((unsigned long)sbrk(-16000) >= (-4095UL))
+ tst_brk(TFAIL, "Error: sbrk failed, errno = %d", errno);
+
#ifdef __mips__
- vp = (void *)((char *)sbrk(0) + 256 * K_1);
-#elif defined(__powerpc__) || defined(__powerpc64__)
+ vp = (void *)((char *)sbrk(0) + 256 * SHMSIZE);
+#elif defined(__powerpc__) || defined(__powerpc64__)
vp = (void *)((char *)sbrk(0) + getpagesize());
#else
/* SHM_RND rounds vp on the nearest multiple of SHMLBA */
vp = (void *)SHMALIGN((char *)sbrk(0) + 1);
#endif
- c3 = shmat(shmid, vp, SHM_RND);
- if (c3 == (char *)-1) {
- perror("shmat1");
- tst_resm(TFAIL,
- "Error: shmat Failed, shmid = %d, errno = %d",
- shmid, errno);
- rm_shm(shmid);
- tst_exit();
- }
-
- tst_resm(TPASS, "sbrk, shmat");
-
-/*--------------------------------------------------------*/
-#if defined (__ia64__) || defined(__mips__) || defined(__hppa__) || defined(__arm__) || defined(__aarch64__)
- while ((vp = sbrk(INCREMENT)) != (void *)-1) ;
- if (errno != ENOMEM) {
- tst_resm(TFAIL, "Error: sbrk failed, errno = %d", errno);
- rm_shm(shmid);
- tst_exit();
- }
-#else
- if ((vp = sbrk(INCREMENT)) != (void *)-1) {
- tst_resm(TFAIL,
- "Error: sbrk succeeded! ret = %p, curbrk = %p, ",
- vp, sbrk(0));
- rm_shm(shmid);
- tst_exit();
- }
-#endif
-
- tst_resm(TPASS, "sbrk");
+ SAFE_SHMAT(shmid, vp, SHM_RND);
-/*------------------------------------------------------*/
+ TST_EXP_FAIL((long)sbrk(INCREMENT), ENOMEM);
- rm_shm(shmid);
- tst_exit();
+ SAFE_SHMCTL(shmid, IPC_RMID, NULL);
}
-static int rm_shm(int shmid)
-{
- if (shmctl(shmid, IPC_RMID, NULL) == -1) {
- perror("shmctl");
- tst_brkm(TFAIL,
- NULL,
- "shmctl Failed to remove: shmid = %d, errno = %d",
- shmid, errno);
- }
- return (0);
-}
+static struct tst_test test = {
+ .test_all = run,
+};
--
2.50.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* [LTP] [PATCH v2 9/9] mem: shmt10: Convert to new API
2025-06-30 13:13 [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API Ricardo B. Marlière via ltp
` (7 preceding siblings ...)
2025-06-30 13:13 ` [LTP] [PATCH v2 8/9] mem: shmt09: " Ricardo B. Marlière via ltp
@ 2025-06-30 13:13 ` Ricardo B. Marlière via ltp
2025-07-01 3:19 ` [LTP] [PATCH v2 0/9] mem: shmt: " Li Wang via ltp
9 siblings, 0 replies; 12+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-06-30 13:13 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
testcases/kernel/mem/shmt/Makefile | 10 +-
testcases/kernel/mem/shmt/shmt10.c | 193 ++++++++++---------------------------
2 files changed, 50 insertions(+), 153 deletions(-)
diff --git a/testcases/kernel/mem/shmt/Makefile b/testcases/kernel/mem/shmt/Makefile
index 7fe4e75b567367e6c4b0978dec831ca268e99567..75249fe647716d4bb01b83e7d564ffabeb5c8c02 100644
--- a/testcases/kernel/mem/shmt/Makefile
+++ b/testcases/kernel/mem/shmt/Makefile
@@ -23,15 +23,7 @@
top_srcdir ?= ../../../..
LTPLIBS = newipc
+LTPLDLIBS = -lltpnewipc
include $(top_srcdir)/include/mk/testcases.mk
-
-shmt02: LTPLDLIBS = -lltpnewipc
-shmt03: LTPLDLIBS = -lltpnewipc
-shmt04: LTPLDLIBS = -lltpnewipc
-shmt05: LTPLDLIBS = -lltpnewipc
-shmt07: LTPLDLIBS = -lltpnewipc
-shmt08: LTPLDLIBS = -lltpnewipc
-shmt09: LTPLDLIBS = -lltpnewipc
-
include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/mem/shmt/shmt10.c b/testcases/kernel/mem/shmt/shmt10.c
index c63bb15928dc958d5ac2787b63aa3c97398cefb4..2bd48b6b50bc1c84c857baf316fe44a6ce527148 100644
--- a/testcases/kernel/mem/shmt/shmt10.c
+++ b/testcases/kernel/mem/shmt/shmt10.c
@@ -1,166 +1,71 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
- *
- * Copyright (c) International Business Machines Corp., 2002
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (c) International Business Machines Corp., 2002
+ * 12/20/2002 Port to LTP robbiew@us.ibm.com
+ * 06/30/2001 Port to Linux nsharoff@us.ibm.com
+ * Copyright (c) 2025 SUSE LLC Ricardo B. Marlière <rbm@suse.com>
*/
-/* 12/20/2002 Port to LTP robbiew@us.ibm.com */
-/* 06/30/2001 Port to Linux nsharoff@us.ibm.com */
-
-/*
- * NAME
- * shmt10.c - test simultaneous shmat/shmdt
- *
- * CALLS
- * shmget, shmat, shmdt, shmctl
- *
- * ALGORITHM
- * Create a shared memory segment and fork a child. Both
- * parent and child spin in a loop attaching and detaching
- * the segment. After completing the specified number of
- * iterations, the child exits and the parent deletes the
- * segment.
- *
- * USAGE
- * shmt10 [-i 500]
- * -i # of iterations, default 500
- *
+/*\
+ * Create a shared memory segment and fork a child. Both
+ * parent and child spin in a loop attaching and detaching
+ * the segment. After completing the specified number of
+ * iterations, the child exits and the parent deletes the
+ * segment.
*/
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <signal.h>
-#include <errno.h>
-
-#define SIZE 0x32768
-
-/** LTP Port **/
-#include "test.h"
-
-char *TCID = "shmt10"; /* Test program identifier. */
-int TST_TOTAL = 2; /* Total number of test cases. */
-/**************/
+#include "tst_test.h"
+#include "tst_safe_sysv_ipc.h"
+#include "libnewipc.h"
-int shmid;
-key_t key;
+#define SHMSIZE 0x32768
-static int child(int);
-static int rm_shm(int);
-static void fini(int);
+static char *str_iter_n;
+static long long iter_n = 500;
+static int shmid;
-int main(int argc, char *argv[])
+static void do_shm_cycle(long long iter_n)
{
- char *c1 = NULL;
- int pid, st;
- register int i;
- int iter = 500;
- int c;
- extern char *optarg;
+ char *addr;
- key = (key_t) getpid();
- signal(SIGTERM, fini);
-
-/*--------------------------------------------------------*/
-
- while ((c = getopt(argc, argv, "i:")) != EOF) {
- switch (c) {
- case 'i':
- iter = atoi(optarg);
- break;
- default:
- tst_brkm(TCONF, NULL, "usage: %s [-i <# iterations>]",
- argv[0]);
- }
+ for (int i = 0; i < iter_n; i++) {
+ addr = SAFE_SHMAT(shmid, NULL, 0);
+ addr[0] = 'a';
+ SAFE_SHMDT(addr);
}
+}
-/*------------------------------------------------------------------------*/
-
- if ((shmid = shmget(key, SIZE, IPC_CREAT | 0666)) < 0) {
- tst_resm(TFAIL, "shmget");
- tst_brkm(TFAIL, NULL, "Error: shmid = %d", shmid);
- }
+static void run(void)
+{
+ key_t key;
- pid = fork();
- switch (pid) {
- case -1:
- tst_brkm(TBROK, NULL, "fork failed");
- case 0:
- child(iter);
- tst_exit();
- }
+ key = GETIPCKEY();
- for (i = 0; i < iter; i++) {
- if ((c1 = shmat(shmid, NULL, 0)) == (char *)-1) {
- tst_resm(TFAIL,
- "Error shmat: iter %d, shmid = %d", i,
- shmid);
- break;
- }
- if (shmdt(c1) < 0) {
- tst_resm(TFAIL, "Error: shmdt: iter %d ", i);
- break;
- }
+ shmid = SAFE_SHMGET(key, SHMSIZE, IPC_CREAT | 0666);
+ if (!SAFE_FORK()) {
+ do_shm_cycle(iter_n);
+ _exit(0);
}
- while (wait(&st) < 0 && errno == EINTR) ;
- tst_resm(TPASS, "shmat,shmdt");
-/*------------------------------------------------------------------------*/
- rm_shm(shmid);
- tst_exit();
-}
+ do_shm_cycle(iter_n);
+ tst_reap_children();
+ SAFE_SHMCTL(shmid, IPC_RMID, NULL);
-static int rm_shm(int shmid)
-{
- if (shmctl(shmid, IPC_RMID, NULL) == -1) {
- perror("shmctl");
- tst_brkm(TFAIL,
- NULL,
- "shmctl Failed to remove: shmid = %d, errno = %d",
- shmid, errno);
- }
- return (0);
+ tst_res(TPASS, "Attached and detached %lld times", iter_n * 2);
}
-static int child(int iter)
+static void setup(void)
{
- register int i;
- char *c1;
-
- for (i = 0; i < iter; i++) {
- if ((c1 = shmat(shmid, NULL, 0)) == (char *)-1) {
- tst_brkm(TFAIL,
- NULL,
- "Error:child proc: shmat: iter %d, shmid = %d",
- i, shmid);
- }
- if (shmdt(c1) < 0) {
- tst_brkm(TFAIL,
- NULL, "Error: child proc: shmdt: iter %d ",
- i);
- }
- }
- return (0);
+ if (tst_parse_filesize(str_iter_n, &iter_n, 1, LLONG_MAX))
+ tst_brk(TBROK, "Invalid amount of iterations: %s", str_iter_n);
}
-static void fini(int sig)
-{
- rm_shm(shmid);
-}
+static struct tst_test test = {
+ .setup = setup,
+ .test_all = run,
+ .forks_child = 1,
+ .options = (struct tst_option[]) {
+ {"n:", &str_iter_n, "Amount of iterations (default 500)"},
+ {}
+ },
+};
--
2.50.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API
2025-06-30 13:13 [LTP] [PATCH v2 0/9] mem: shmt: Convert to new API Ricardo B. Marlière via ltp
` (8 preceding siblings ...)
2025-06-30 13:13 ` [LTP] [PATCH v2 9/9] mem: shmt10: " Ricardo B. Marlière via ltp
@ 2025-07-01 3:19 ` Li Wang via ltp
2025-07-01 9:49 ` Ricardo B. Marlière via ltp
9 siblings, 1 reply; 12+ messages in thread
From: Li Wang via ltp @ 2025-07-01 3:19 UTC (permalink / raw)
To: Ricardo B. Marlière; +Cc: Linux Test Project
Patchset merged with minor adjustments(code format), thanks!
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread