]> git.gsnw.org Git - fping.git/commitdiff
restore inadvertantly removed IPv4 test for -k
authorErik Auerswald <auerswal@unix-ag.uni-kl.de>
Sat, 26 Apr 2025 16:19:13 +0000 (18:19 +0200)
committerErik Auerswald <auerswal@unix-ag.uni-kl.de>
Sat, 24 May 2025 12:46:52 +0000 (14:46 +0200)
This was removed in an commit by me that should only have added
a new test (commit 4160d03a2653684b37a776744095aac43f7efc88).

ci/test-11-unpriv.pl

index 5b5705d837f61cc06d8ee1c82ee2149974a2a300..6ec0768d77a028d311b378c2ea893df723932f32 100755 (executable)
@@ -40,7 +40,7 @@ else {
 }
 
 sub test_unprivileged_works {
-    plan tests => 15;
+    plan tests => 18;
 
     {
         my $cmd = Test::Command->new(cmd => "$fping_copy 127.0.0.1");
@@ -60,6 +60,15 @@ sub test_unprivileged_works {
         $cmd->stdout_is_eq("127.0.0.1 is alive (TTL unknown)\n");
         $cmd->stderr_is_eq("");
     }
+    SKIP: {
+        if($^O ne 'linux') {
+            skip '-k option is only supported on Linux', 3;
+        }
+        my $cmd = Test::Command->new(cmd => "$fping_copy -4 -k 256 127.0.0.1");
+        $cmd->exit_is_num(0);
+        $cmd->stdout_is_eq("127.0.0.1 is alive\n");
+        $cmd->stderr_like(qr{fwmark ipv4: .+\n});
+    }
     SKIP: {
         if($^O ne 'linux') {
             skip '-k option is only supported on Linux', 3;