On Fri, Jan 31, 2025 at 4:21 PM Ondrej Mosnacek <omosnace@xxxxxxxxxx> wrote: > > In CentOS Stream 10 (and possibly other environments) the > net.mptcp.enabled sysctl will be set to 0 by default. The testuite > currently doesn't detect this and hangs when trying to run the MPTCP > tests. Adjust the test to temporarily enable MPTCP during the test so > that it can succeed in these conditions. > > Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx> > --- > tests/inet_socket/test | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/tests/inet_socket/test b/tests/inet_socket/test > index 08c7b1d..ae06ae7 100755 > --- a/tests/inet_socket/test > +++ b/tests/inet_socket/test > @@ -91,6 +91,16 @@ sub server_end { > system("rm -f $basedir/flag"); > } > > +if ( $proto eq "mptcp" ) { > + > + # Temporarily enable MPTCP if it's disabled by default > + $mptcp_enabled = `sysctl -n net.mptcp.enabled`; > + chomp($mptcp_enabled); > + if ( $mptcp_enabled ne "1" ) { > + system("sysctl -w net.mptcp.enabled=1"); > + } > +} > + > # Load NetLabel configuration for full CIPSO/IPv4 labeling over loopback. > system "/bin/sh $basedir/cipso-fl-load"; > > @@ -445,4 +455,10 @@ if ($test_calipso) { > system "/bin/sh $basedir/calipso-flush"; > } > > +if ( $proto eq "mptcp" and $mptcp_enabled ne "1" ) { > + > + # Reset net.mptcp.enabled if it was 0 before test > + system("sysctl -w net.mptcp.enabled=0"); > +} > + > exit; > -- > 2.48.1 > Applied: https://github.com/SELinuxProject/selinux-testsuite/commit/6aba9eb5ba78bcabe8abb5e3809f3680dc0403a1 -- Ondrej Mosnacek Senior Software Engineer, Linux Security - SELinux kernel Red Hat, Inc.