Skip to contentSkip to conversation

selftests/landlock: Enable the new CONFIG_AF_UNIX_OOB

PATCH In review Mickaël Salaün 2 participants 2 messages Feb 11, 2025 – Feb 13, 2025

Subsystems (3)
lore
Share & tools
lore

Mickaël Salaün

author maintainer
#0 lore raw

PATCH 1/1 selftests/landlock: Enable the new CONFIG_AF_UNIX_OOB

Since commit 5155cbcdbf03 ("af_unix: Add a prompt to CONFIG_AF_UNIX_OOB"), the Landlock selftests's configuration is not enough to build a minimal kernel. Because scoped_signal_test checks with the MSG_OOB flag, we need to enable CONFIG_AF_UNIX_OOB for tests:

# RUN fown.no_sandbox.sigurg_socket ...
# scoped_signal_test.c:420:sigurg_socket:Expected 1 (1) == send(client_socket, ".", 1, MSG_OOB) (-1) # sigurg_socket: Test terminated by assertion
# FAIL fown.no_sandbox.sigurg_socket
...

Cc Florent Revest <[email protected]>
Cc Günther Noack <[email protected]>
---
 tools/testing/selftests/landlock/config | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/landlock/config +1 -0
index 29af19c4e9f9..361f94f8cb0d 100644
@@ -1,3 +1,4 @@
+CONFIG_AF_UNIX_OOB=y
 CONFIG_CGROUPS=y
 CONFIG_CGROUP_SCHED=y
 CONFIG_INET=y
Signature · 1 line
2.48.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Mickaël Salaün

Since commit 5155cbcdbf03 ("af_unix: Add a prompt to CONFIG_AF_UNIX_OOB"), the Landlock selftests's configuration is not enough to build a minimal kernel. Because scoped_signal_test checks with the MSG_OOB flag, we need to enable CONFIG_AF_UNIX_OOB for tests:

Makes sense. Thank you!

Quoted 25 lines

# RUN fown.no_sandbox.sigurg_socket ...
# scoped_signal_test.c:420:sigurg_socket:Expected 1 (1) == send(client_socket, ".", 1, MSG_OOB) (-1) # sigurg_socket: Test terminated by assertion
# FAIL fown.no_sandbox.sigurg_socket
...

Cc Florent Revest <[email protected]>
Cc Günther Noack <[email protected]>
---
 tools/testing/selftests/landlock/config | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/landlock/config +1 -1
index 29af19c4e9f9..361f94f8cb0d 100644
@@ -1,3 +1,4 @@
+CONFIG_AF_UNIX_OOB=y
 CONFIG_CGROUPS=y
 CONFIG_CGROUP_SCHED=y
 CONFIG_INET=y
--

2.48.1