Skip to content

Commit

Permalink
Add test for option combination -Q SECS -o
Browse files Browse the repository at this point in the history
The -o option adds outage duration to the periodic reports.
Each report shows the outage since the last report, not since
the beginning.
  • Loading branch information
auerswal committed Jan 8, 2024
1 parent 9864ae4 commit 37b111f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ci/test-08-options-n-q.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w

use Test::Command tests => 21;
use Test::Command tests => 24;

# -n show targets by name (-d is equivalent)
# -O n set the type of service (tos) flag on the ICMP packets
Expand Down Expand Up @@ -81,4 +81,16 @@
});
}

# fping -Q -o
{
my $cmd = Test::Command->new(cmd => "fping -c4 -Q1 -p550 -o 8.8.8.7");
$cmd->exit_is_num(1);
$cmd->stdout_is_eq("");
$cmd->stderr_like(qr{\[\d+:\d+:\d+\]
8\.8\.8\.7 : xmt/rcv/%loss = 1/0/100%, outage\(ms\) = 55\d
\[\d+:\d+:\d+\]
8\.8\.8\.7 : xmt/rcv/%loss = 2/0/100%, outage\(ms\) = 110\d
8\.8\.8\.7 : xmt/rcv/%loss = 4/0/100%, outage\(ms\) = 220\d
});
}

0 comments on commit 37b111f

Please sign in to comment.