[LTP] [PATCH 18/31] pipe: Remove UCLINUX

Petr Vorel pvorel@suse.cz
Thu Apr 11 16:30:12 CEST 2024


Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/syscalls/pipe/pipe02.c |  9 ---------
 testcases/kernel/syscalls/pipe/pipe04.c | 19 -------------------
 2 files changed, 28 deletions(-)

diff --git a/testcases/kernel/syscalls/pipe/pipe02.c b/testcases/kernel/syscalls/pipe/pipe02.c
index 2247037b1..d6cbff92d 100644
--- a/testcases/kernel/syscalls/pipe/pipe02.c
+++ b/testcases/kernel/syscalls/pipe/pipe02.c
@@ -41,10 +41,6 @@ static void verify_pipe(void)
 
 	memset(wrbuf, 'a', SIZE);
 
-#ifdef UCLINUX
-	maybe_run_child(&do_child, "dd", &fd[0], &fd[1]);
-#endif
-
 	TEST(pipe(fd));
 	if (TST_RET == -1) {
 		tst_res(TFAIL|TTERRNO, "pipe() failed");
@@ -53,12 +49,7 @@ static void verify_pipe(void)
 
 	pid = SAFE_FORK();
 	if (pid == 0) {
-#ifdef UCLINUX
-		if (self_exec(av[0], "dd", fd[0], fd[1]) < 0)
-			tst_brk(TBROK, "self_exec failed");
-#else
 		do_child();
-#endif
 	}
 
 	memset(rdbuf, 0, SIZE);
diff --git a/testcases/kernel/syscalls/pipe/pipe04.c b/testcases/kernel/syscalls/pipe/pipe04.c
index 047fdb523..219daecd8 100644
--- a/testcases/kernel/syscalls/pipe/pipe04.c
+++ b/testcases/kernel/syscalls/pipe/pipe04.c
@@ -84,11 +84,6 @@ int main(int ac, char **av)
 	char rbuf[BUFSIZ];
 
 	tst_parse_opts(ac, av, NULL, NULL);
-#ifdef UCLINUX
-	maybe_run_child(&c1func, "ndd", 1, &fildes[0], &fildes[1]);
-	maybe_run_child(&c2func, "ndd", 2, &fildes[0], &fildes[1]);
-#endif
-
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -102,26 +97,12 @@ int main(int ac, char **av)
 			tst_brkm(TBROK, cleanup, "fork() failed - "
 				 "errno %d", errno);
 		if (c1pid == 0)
-#ifdef UCLINUX
-			if (self_exec(av[0], "ndd", 1, fildes[0], fildes[1]) <
-			    0) {
-				tst_brkm(TBROK, cleanup, "self_exec failed");
-			}
-#else
 			c1func();
-#endif
 		if ((c2pid = tst_fork()) == -1)
 			tst_brkm(TBROK, cleanup, "fork() failed - "
 				 "errno %d", errno);
 		if (c2pid == 0)
-#ifdef UCLINUX
-			if (self_exec(av[0], "ndd", 2, fildes[0], fildes[1]) <
-			    0) {
-				tst_brkm(TBROK, cleanup, "self_exec failed");
-			}
-#else
 			c2func();
-#endif
 
 		/* PARENT */
 		if (close(fildes[1]) == -1)
-- 
2.43.0



More information about the ltp mailing list