[LTP] [PATCH 25/31] setsid01: Remove UCLINUX

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


Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/syscalls/setsid/setsid01.c | 23 ---------------------
 1 file changed, 23 deletions(-)

diff --git a/testcases/kernel/syscalls/setsid/setsid01.c b/testcases/kernel/syscalls/setsid/setsid01.c
index 5df2c1ff4..197e865cb 100644
--- a/testcases/kernel/syscalls/setsid/setsid01.c
+++ b/testcases/kernel/syscalls/setsid/setsid01.c
@@ -49,10 +49,6 @@
 char *TCID = "setsid01";
 int TST_TOTAL = 1;
 
-#ifdef UCLINUX
-static char *argv0;
-#endif
-
 void do_child_1(void);
 void do_child_2(void);
 void setup(void);
@@ -68,12 +64,6 @@ int main(int ac, char **av)
 	int lc;
 
 	tst_parse_opts(ac, av, NULL, NULL);
-#ifdef UCLINUX
-	argv0 = av[0];
-
-	maybe_run_child(&do_child_1, "n", 1);
-	maybe_run_child(&do_child_2, "n", 2);
-#endif
 
 	/*
 	 * perform global setup for the test
@@ -98,14 +88,7 @@ int main(int ac, char **av)
 
 			}
 			if (pid == 0) {
-#ifdef UCLINUX
-				if (self_exec(argv0, "n", 1) < 0) {
-					tst_resm(TFAIL, "self_exec failed");
-
-				}
-#else
 				do_child_1();
-#endif
 			} else {
 				if (setpgid(0, 0) < 0) {
 					tst_resm(TFAIL,
@@ -165,13 +148,7 @@ void do_child_1(void)
 		tst_brkm(TFAIL, NULL, "Fork failed");
 	}
 	if (pid == 0) {
-#ifdef UCLINUX
-		if (self_exec(argv0, "n", 2) < 0) {
-			tst_brkm(TFAIL, NULL, "self_exec failed");
-		}
-#else
 		do_child_2();
-#endif
 	} else {
 		retval = setpgid(0, getppid());
 		if (retval < 0) {
-- 
2.43.0



More information about the ltp mailing list