All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] xfrm: Skip on EOPNOTSUPP in compat mode
@ 2026-06-11  9:37 Andrea Cervesato
  2026-06-11 10:04 ` Cyril Hrubis
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Andrea Cervesato @ 2026-06-11  9:37 UTC (permalink / raw)
  To: Linux Test Project

From: Andrea Cervesato <andrea.cervesato@suse.com>

A 32-bit binary running on a 64-bit kernel uses the XFRM netlink compat
layer, which is only available when CONFIG_XFRM_USER_COMPAT is enabled
(and its module loaded). Without it the kernel returns EOPNOTSUPP for
any XFRM netlink message, which is a configuration limitation rather
than a test failure.

Report TCONF instead of TBROK in that case for xfrm01, xfrm02 and
xfrm03.

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
 testcases/network/sockets/xfrm01.c | 3 +++
 testcases/network/sockets/xfrm02.c | 3 +++
 testcases/network/sockets/xfrm03.c | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/testcases/network/sockets/xfrm01.c b/testcases/network/sockets/xfrm01.c
index 5490d6b8a9f7fde79478ae0484e6ea8156d07cf3..22244032a521a42331b0c1411ae33f75622e64ce 100644
--- a/testcases/network/sockets/xfrm01.c
+++ b/testcases/network/sockets/xfrm01.c
@@ -126,6 +126,9 @@ static void setup(void)
 		if (TST_ERR == EPROTONOSUPPORT)
 			tst_brk(TCONF, "xfrm ESP is not supported by kernel");
 
+		if (tst_is_compat_mode() && TST_ERR == EOPNOTSUPP)
+			tst_brk(TCONF, "xfrm netlink unsupported in compat mode (missing CONFIG_XFRM_USER_COMPAT)");
+
 		tst_brk(TBROK | TTERRNO, "Failed to install xfrm ESP state");
 	}
 }
diff --git a/testcases/network/sockets/xfrm02.c b/testcases/network/sockets/xfrm02.c
index 43edb77d43c8c99e9883fc9922031d559ef31c40..376f6ebe551dd81fbc6a982503eacd68da636f93 100644
--- a/testcases/network/sockets/xfrm02.c
+++ b/testcases/network/sockets/xfrm02.c
@@ -126,6 +126,9 @@ static void setup(void)
 		if (TST_ERR == EPROTONOSUPPORT)
 			tst_brk(TCONF, "xfrm ESP is not supported by kernel");
 
+		if (tst_is_compat_mode() && TST_ERR == EOPNOTSUPP)
+			tst_brk(TCONF, "xfrm netlink unsupported in compat mode (missing CONFIG_XFRM_USER_COMPAT)");
+
 		tst_brk(TBROK | TTERRNO, "Failed to install xfrm ESP state");
 	}
 
diff --git a/testcases/network/sockets/xfrm03.c b/testcases/network/sockets/xfrm03.c
index 02ab95c6b7a87f8f206b30a39bb6feb097117998..fa5df9c285d540d5cad0e890a73d43ad9aeba1c2 100644
--- a/testcases/network/sockets/xfrm03.c
+++ b/testcases/network/sockets/xfrm03.c
@@ -202,6 +202,9 @@ static void setup(void)
 		if (TST_ERR == EPROTONOSUPPORT)
 			tst_brk(TCONF, "xfrm ESP is not supported by kernel");
 
+		if (tst_is_compat_mode() && TST_ERR == EOPNOTSUPP)
+			tst_brk(TCONF, "xfrm netlink unsupported in compat mode (missing CONFIG_XFRM_USER_COMPAT)");
+
 		tst_brk(TBROK | TTERRNO, "Failed to install xfrm ESP state");
 	}
 

---
base-commit: c685f1b774fab694c42dfb7522bc42d999904373
change-id: 20260611-fix_xfrm_compat_mode-0503f1f9bb8d

Best regards,
-- 
Andrea Cervesato <andrea.cervesato@suse.com>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-11 13:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11  9:37 [LTP] [PATCH] xfrm: Skip on EOPNOTSUPP in compat mode Andrea Cervesato
2026-06-11 10:04 ` Cyril Hrubis
2026-06-11 10:25 ` [LTP] " linuxtestproject.agent
2026-06-11 11:16 ` [LTP] [PATCH] " Avinesh Kumar via ltp
2026-06-11 12:55 ` Martin Doucha
2026-06-11 13:49 ` Andrea Cervesato via ltp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.