]> git.gsnw.org Git - fping.git/commitdiff
Test -l together with -Q or -t
authorErik Auerswald <auerswal@unix-ag.uni-kl.de>
Tue, 6 Feb 2024 20:45:27 +0000 (21:45 +0100)
committerDavid Schweikert <david@schweikert.ch>
Wed, 7 Feb 2024 07:55:51 +0000 (08:55 +0100)
ci/test-07-options-i-m.pl

index 2eddc453b8130c7bf68609fec642ef7eb52d0f41..da442a254d55d8d7f171ba08ea9acdedf5f4b17c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-use Test::Command tests => 12;
+use Test::Command tests => 15;
 use Test::More;
 
 #  -i n       interval between sending ping packets (in millisec) (default 25)
@@ -50,6 +50,24 @@ $cmd->stderr_like(qr{\[\d+:\d+:\d+\]
 });
 }
 
+# fping -l -Q
+{
+my $cmd = Test::Command->new(cmd => '(sleep 2; pkill fping)& fping -p 850 -l -Q 1 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+
+\[\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+
+});
+}
+
+# fping -l -t
+{
+my $cmd = Test::Command->new(cmd => '(sleep 2; pkill fping)& fping -p 900 -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\)
+});
+}
 
 # fping -M
 SKIP: {