Skip to content

Commit 25aabee

Browse files
WOnder93stephensmalley
authored andcommitted
tests/inet_socket: properly detect IPSEC support
Check if XFRM itself is supported by the kernel when deciding whether to run the IPSEC tests, so that the testsuite can be run on kernels with CONFIG_XFRM_USER unset, too. Signed-off-by: Ondrej Mosnacek <[email protected]> Acked-by: Stephen Smalley <[email protected]>
1 parent f24939e commit 25aabee

File tree

1 file changed

+3
-1
lines changed
  • tests/inet_socket

1 file changed

+3
-1
lines changed

tests/inet_socket/test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ BEGIN {
2525
}
2626

2727
$test_ipsec = 0;
28-
if ( system("ip xfrm policy help 2>&1 | grep -q ctx") eq 0 ) {
28+
if ( system("ip xfrm policy help 2>&1 | grep -q ctx") eq 0
29+
and system("ip xfrm policy list &>/dev/null") eq 0 )
30+
{
2931
$test_count += 4;
3032
$test_ipsec = 1;
3133
}

0 commit comments

Comments
 (0)