On Tue, Aug 27, 2024 at 11:09 AM Ondrej Mosnacek <omosnace@xxxxxxxxxx> wrote: > > 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 > > Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx> Acked-by: Stephen Smalley <stephen.smalley.work@xxxxxxxxx> Wondering if we should drop NET_KEY from the testsuite defconfig too then. > --- > tests/key_socket/test | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/tests/key_socket/test b/tests/key_socket/test > index a13327f..3f371fe 100755 > --- a/tests/key_socket/test > +++ b/tests/key_socket/test > @@ -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 ############# > -- > 2.46.0 > >