Skip to content

Commit

Permalink
tests/key_socket: skip the test if CONFIG_NET_KEY is not enabled
Browse files Browse the repository at this point in the history
RHEL/CentOS Stream 10+ and Fedora ELN will have CONFIG_NET_KEY disabled
[1]. Make the test skip itself when it detects that PF_KEY is not
supported so that the testsuite can still pass out-of-the-box on these
platforms.

[1] https://gitlab.com/cki-project/kernel-ark/-/commit/99d6d1c86fe1bb1df5c0b80f4717826c2330e291

Acked-by: Stephen Smalley <[email protected]>
Signed-off-by: Ondrej Mosnacek <[email protected]>
  • Loading branch information
WOnder93 committed Aug 30, 2024
1 parent 0815abc commit a9e631f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/key_socket/test
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ BEGIN {
$v = " ";
}

plan tests => 5;
$result = system "$basedir/key_sock $v 2>&1";
if ( $result >> 8 eq 97 ) { # EAFNOSUPPORT
plan skip_all => "PF_KEY not supported by kernel";
}
else {
plan tests => 5;
}
}

############ Test key_socket #############
Expand Down

0 comments on commit a9e631f

Please sign in to comment.