diff mbox series

[RFC,v2,11/17] tests/inet_socket: skip mptcp if not supported

Message ID 20250107134606.37260-11-cgoettsche@seltendoof.de (mailing list archive)
State New
Delegated to: Ondrej Mosnáček
Headers show
Series [RFC,v2,01/17] Fix typos | expand

Commit Message

Christian Göttsche Jan. 7, 2025, 1:45 p.m. UTC
From: Christian Göttsche <cgzones@googlemail.com>

Also fix a typo in the unknown protocol case.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 tests/inet_socket/test | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/inet_socket/test b/tests/inet_socket/test
index 08c7b1d..71bc7dd 100755
--- a/tests/inet_socket/test
+++ b/tests/inet_socket/test
@@ -9,6 +9,9 @@  BEGIN {
     $proto = basename($basedir);
 
     if ( $proto eq "tcp" or $proto eq "mptcp" ) {
+        if ( $proto eq "mptcp" && system("modprobe mptcp 2>/dev/null") ne 0 ) {
+            plan skip_all => "protocol mptcp not supported";
+        }
         $is_stream   = 1;
         $fail_value1 = 5;
         $fail_value2 = 5;
@@ -21,7 +24,7 @@  BEGIN {
         $test_count  = 11;
     }
     else {
-        plan skip => "unknown protocol name \'$proto\'";
+        plan skip_all => "unknown protocol name \'$proto\'";
     }
 
     $test_ipsec = 0;