"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ci/test-04-options-a-b.pl" between
fping-5.0.tar.gz and fping-5.1.tar.gz

About: fping quickly ping N number of hosts to determine their reachability without flooding the network.

test-04-options-a-b.pl  (fping-5.0):test-04-options-a-b.pl  (fping-5.1)
skipping to change at line 88 skipping to change at line 88
# fping -b # fping -b
{ {
my $cmd = Test::Command->new(cmd => "fping -b 1000 127.0.0.1"); my $cmd = Test::Command->new(cmd => "fping -b 1000 127.0.0.1");
$cmd->exit_is_num(0); $cmd->exit_is_num(0);
$cmd->stdout_is_eq("127.0.0.1 is alive\n"); $cmd->stdout_is_eq("127.0.0.1 is alive\n");
$cmd->stderr_is_eq(""); $cmd->stderr_is_eq("");
} }
# fping -B # fping -B
{ SKIP: {
my $t0 = [gettimeofday]; if($^O eq 'darwin') {
my $cmd = Test::Command->new(cmd => "fping -t 100 -r 3 -B 2 8.8.8.7"); skip 'timing test not reliable on macOS', 5;
$cmd->exit_is_num(1); }
$cmd->stdout_is_eq("8.8.8.7 is unreachable\n"); my $t0 = [gettimeofday];
$cmd->stderr_like(qr{^(|(8.8.8.7: error while sending ping: No route to host\n)+ my $cmd = Test::Command->new(cmd => "fping -t 100 -r 3 -B 2 8.8.8.7");
)$}); $cmd->exit_is_num(1);
my $elapsed = tv_interval($t0); $cmd->stdout_is_eq("8.8.8.7 is unreachable\n");
# 0.1 + 0.2 + 0.4 + 0.8 = 1.5 $cmd->stderr_like(qr{^(|(8.8.8.7: error while sending ping: No route to host
cmp_ok($elapsed, '>=', 1.5); \n)+)$});
cmp_ok($elapsed, '<', 1.8); my $elapsed = tv_interval($t0);
# 0.1 + 0.2 + 0.4 + 0.8 = 1.5
cmp_ok($elapsed, '>=', 1.5);
cmp_ok($elapsed, '<', 1.9);
} }
 End of changes. 1 change blocks. 
11 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)