[PATCH] skip inet_socket/mptcp when CONFIG_MPTCP is not enabled

Jan Onderka <[email protected]>
Newsgroups org.kernel.vger.selinux
Message-ID <[email protected]>
Signed-off-by: Jan Onderka <[email protected]>
---
 tests/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile b/tests/Makefile
index 4fe6f3c..6db1ae6 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -148,10 +148,12 @@ endif
 endif
 
 # MPTCP is supported since kernel 5.6, but only works with SELinux
-# since 6.5
+# since 6.5. Skip when the running kernel was built without MPTCP.
 ifneq ($(shell ./kvercmp $$(uname -r) 6.5),-1)
+ifeq ($(shell grep -qE '^CONFIG_MPTCP=(y|m)' /lib/modules/$$(uname -r)/config 2>/dev/null && echo true),true)
 SUBDIRS += inet_socket/mptcp
 endif
+endif
 
 # nlmsg test dependencies: policy >= 30, nlmsg permission, netlink_xperm capability
 ifeq ($(shell [ $(MOD_POL_VERS) -ge 18 -a $(MAX_KERNEL_POLICY) -ge 30 ] && [ -f /sys/fs/selinux/class/netlink_route_socket/perms/nlmsg ] && grep -q 1 $(SELINUXFS)/policy_capabilities/netlink_xperm && echo true),true)
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.