|
|
@ -1,10 +1,11 @@
|
|
|
|
#!/usr/bin/perl -w
|
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
|
|
|
|
use Test::Command tests => 4;
|
|
|
|
use Test::Command tests => 7;
|
|
|
|
|
|
|
|
|
|
|
|
# -i n interval between sending ping packets (in millisec) (default 25)
|
|
|
|
# -i n interval between sending ping packets (in millisec) (default 25)
|
|
|
|
# -l loop sending pings forever
|
|
|
|
# -l loop sending pings forever
|
|
|
|
# -m ping multiple interfaces on target host
|
|
|
|
# -m ping multiple interfaces on target host
|
|
|
|
|
|
|
|
# -M don't fragment
|
|
|
|
|
|
|
|
|
|
|
|
# fping -i n
|
|
|
|
# fping -i n
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -22,4 +23,12 @@ $cmd->stdout_like(qr{127\.0\.0\.1 : \[0\], 84 bytes, 0\.\d+ ms \(0.\d+ avg, 0% l
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# fping -M
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping -M 127.0.0.1");
|
|
|
|
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
|
|
|
|
$cmd->stdout_is_eq("127.0.0.1 is alive\n");
|
|
|
|
|
|
|
|
$cmd->stderr_is_eq("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# fping -m -> test-14-internet-hosts
|
|
|
|
# fping -m -> test-14-internet-hosts
|
|
|
|