diff mbox series

[20/31] recv*: Remove UCLINUX

Message ID 20240411143025.352507-21-pvorel@suse.cz
State Accepted
Headers show
Series Remove UCLINUX (nommu support) from LTP legacy C API | expand

Commit Message

Petr Vorel April 11, 2024, 2:30 p.m. UTC
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/syscalls/recv/recv01.c         | 17 -----------------
 testcases/kernel/syscalls/recvfrom/recvfrom01.c | 15 ---------------
 2 files changed, 32 deletions(-)
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/recv/recv01.c b/testcases/kernel/syscalls/recv/recv01.c
index 64658ae32..d71243c30 100644
--- a/testcases/kernel/syscalls/recv/recv01.c
+++ b/testcases/kernel/syscalls/recv/recv01.c
@@ -87,13 +87,10 @@  struct test_case_t {		/* test case structure */
 	0, 0, 0, buf, sizeof(buf), 0,
 		    -1, ENOTSOCK, setup0, cleanup0, "invalid socket"}
 	,
-#ifndef UCLINUX
-	    /* Skip since uClinux does not implement memory protection */
 	{
 	PF_INET, SOCK_STREAM, 0, (void *)-1, sizeof(buf), 0,
 		    -1, EFAULT, setup1, cleanup1, "invalid recv buffer"}
 	,
-#endif
 	{
 	PF_INET, SOCK_STREAM, 0, buf, sizeof(buf), MSG_OOB,
 		    -1, EINVAL, setup1, cleanup1, "invalid MSG_OOB flag set"}
@@ -105,19 +102,11 @@  struct test_case_t {		/* test case structure */
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);
 
-#ifdef UCLINUX
-static char *argv0;
-#endif
-
 int main(int argc, char *argv[])
 {
 	int lc;
 
 	tst_parse_opts(argc, argv, NULL, NULL);
-#ifdef UCLINUX
-	argv0 = argv[0];
-	maybe_run_child(&do_child, "d", &sfd);
-#endif
 
 	setup();
 
@@ -242,13 +231,7 @@  pid_t start_server(struct sockaddr_in *sin0)
 
 	switch ((pid = tst_fork())) {
 	case 0:		/* child */
-#ifdef UCLINUX
-		if (self_exec(argv0, "d", sfd) < 0)
-			tst_brkm(TBROK | TERRNO, cleanup,
-				 "server self_exec failed");
-#else
 		do_child();
-#endif
 		break;
 	case -1:
 		tst_brkm(TBROK | TERRNO, cleanup, "server fork failed");
diff --git a/testcases/kernel/syscalls/recvfrom/recvfrom01.c b/testcases/kernel/syscalls/recvfrom/recvfrom01.c
index a05256003..f26f85688 100644
--- a/testcases/kernel/syscalls/recvfrom/recvfrom01.c
+++ b/testcases/kernel/syscalls/recvfrom/recvfrom01.c
@@ -126,21 +126,12 @@  struct test_case_t {		/* test case structure */
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);
 
-#ifdef UCLINUX
-static char *argv0;
-#endif
-
 int main(int argc, char *argv[])
 {
 	int lc;
 
 	tst_parse_opts(argc, argv, NULL, NULL);
 
-#ifdef UCLINUX
-	argv0 = argv[0];
-	maybe_run_child(&do_child, "d", &sfd);
-#endif
-
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
@@ -271,13 +262,7 @@  pid_t start_server(struct sockaddr_in *sin0)
 
 	switch ((pid = tst_fork())) {
 	case 0:		/* child */
-#ifdef UCLINUX
-		if (self_exec(argv0, "d", sfd) < 0) {
-			tst_brkm(TBROK, cleanup, "server self_exec failed");
-		}
-#else
 		do_child();
-#endif
 		break;
 	case -1:
 		tst_brkm(TBROK | TERRNO, cleanup, "server fork failed");