]> git.gsnw.org Git - fping.git/commitdiff
Use SIGINT to kill fping so that coverage data is collected.
authorDavid Schweikert <david@schweikert.ch>
Wed, 24 Dec 2025 07:06:32 +0000 (08:06 +0100)
committerDavid Schweikert <david@schweikert.ch>
Thu, 25 Dec 2025 07:26:10 +0000 (08:26 +0100)
ci/test-07-options-i-m.pl

index 7cca6ab3f4f3b9dd12d0a06c987b6fce76dd6932..66736e7a306776f8acc604e11f65d4bf0f10e477 100755 (executable)
@@ -56,7 +56,7 @@ $cmd->stderr_like(qr{binding to specific interface \(SO_BINDTODEVICE\):.*\n});
 
 # fping -l
 {
-my $cmd = Test::Command->new(cmd => '(sleep 0.5; pkill fping)& fping -p 100 -l 127.0.0.1');
+my $cmd = Test::Command->new(cmd => '(sleep 0.5; pkill -INT fping)& fping -p 100 -l 127.0.0.1');
 $cmd->stdout_like(qr{127\.0\.0\.1 : \[0\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
 127\.0\.0\.1 : \[1\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
 });
@@ -64,7 +64,7 @@ $cmd->stdout_like(qr{127\.0\.0\.1 : \[0\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0
 
 # fping -l --print-tos --print-ttl
 {
-my $cmd = Test::Command->new(cmd => '(sleep 0.5; pkill fping)& fping -p 100 --print-ttl --print-tos -l 127.0.0.1');
+my $cmd = Test::Command->new(cmd => '(sleep 0.5; pkill -INT fping)& fping -p 100 --print-ttl --print-tos -l 127.0.0.1');
 $cmd->stdout_like(qr{127\.0\.0\.1 : \[0\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\) \(TOS \d+\) \(TTL \d+\)
 127\.0\.0\.1 : \[1\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\) \(TOS \d+\) \(TTL \d+\)
 });
@@ -83,7 +83,7 @@ $cmd->stderr_is_eq("");
 
 # fping -l with SIGQUIT
 {
-my $cmd = Test::Command->new(cmd => '(sleep 0.5; pkill -QUIT fping; sleep 0.5; pkill fping)& fping -p 100 -l 127.0.0.1');
+my $cmd = Test::Command->new(cmd => '(sleep 0.5; pkill -QUIT fping; sleep 0.5; pkill -INT fping)& fping -p 100 -l 127.0.0.1');
 $cmd->stdout_like(qr{127\.0\.0\.1 : \[0\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
 127\.0\.0\.1 : \[1\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
 127\.0\.0\.1 : \[2\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
@@ -100,7 +100,7 @@ SKIP: {
 if($^O eq 'darwin') {
     skip 'On macOS, this test is unreliable', 2;
 }
-my $cmd = Test::Command->new(cmd => '(sleep 1.5; pkill fping)& fping -p 100 -l -Q 0.5 127.0.0.1');
+my $cmd = Test::Command->new(cmd => '(sleep 1.5; pkill -INT fping)& fping -p 100 -l -Q 0.5 127.0.0.1');
 $cmd->stdout_is_eq("");
 $cmd->stderr_like(qr{\[\d\d:\d\d:\d\d\]
 127\.0\.0\.1 : xmt/rcv/%loss = \d/\d/\d%, min/avg/max = \d\.\d+/\d\.\d+/\d\.\d+
@@ -111,7 +111,7 @@ $cmd->stderr_like(qr{\[\d\d:\d\d:\d\d\]
 
 # fping -l -t
 {
-my $cmd = Test::Command->new(cmd => '(sleep 0.5; pkill fping)& fping -p 100 -t 1500 -l 127.0.0.1');
+my $cmd = Test::Command->new(cmd => '(sleep 0.5; pkill -INT fping)& fping -p 100 -t 1500 -l 127.0.0.1');
 $cmd->stdout_like(qr{127\.0\.0\.1 : \[0\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
 127\.0\.0\.1 : \[1\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
 });