Skip to contentSkip to conversation

y2038: testsuite/smokey: Skip recvmmsg64 test if kernel support is missing

PATCH Applied Florian Bezdeka 2 participants 2 messages Oct 20, 2021 – Oct 21, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 y2038: testsuite/smokey: Skip recvmmsg64 test if kernel support is missing

It might happen that the kernel does not support the combination of address family and protocol we use for this test. Skip the test and simulate success in such cases.

---
 testsuite/smokey/y2038/syscall-tests.c | 4 ++++
 1 file changed, 4 insertions(+)
testsuite/smokey/y2038/syscall-tests.c +4 -0
index f025fd55d..a1a5d12f6 100644
@@ -1016,6 +1016,10 @@ static int test_sc_cobalt_recvmmsg64(void)
 	};
 
 	sock = smokey_check_errno(socket(AF_RTIPC, SOCK_DGRAM, IPCPROTO_XDDP));
+	if (sock == -EAFNOSUPPORT) {
+		smokey_note("recvmmsg64: skipped. (no kernel support)");
+		return 0;
+	}
 	if (sock < 0)
 		return sock;
 
Signature · 1 line
2.31.1
Applied
#1 lore raw
Quoted 15 lines · Florian Bezdeka

It might happen that the kernel does not support the combination of address family and protocol we use for this test. Skip the test and simulate success in such cases.

---
 testsuite/smokey/y2038/syscall-tests.c | 4 ++++
 1 file changed, 4 insertions(+)
testsuite/smokey/y2038/syscall-tests.c +0 -0
index f025fd55d..a1a5d12f6 100644

testsuite/smokey/y2038/syscall-tests.c static int test_sc_cobalt_recvmmsg64(void) · line 1025

Quoted 10 lines
testsuite/smokey/y2038/syscall-tests.c +4 -0
@@ -1016,6 +1016,10 @@ static int test_sc_cobalt_recvmmsg64(void)
 	};
 
 	sock = smokey_check_errno(socket(AF_RTIPC, SOCK_DGRAM, IPCPROTO_XDDP));
+	if (sock == -EAFNOSUPPORT) {
+		smokey_note("recvmmsg64: skipped. (no kernel support)");
+		return 0;
+	}
 	if (sock < 0)
 		return sock;
 

Thanks, applied.

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux