|
|
@ -1,6 +1,7 @@
|
|
|
|
#!/usr/bin/perl -w
|
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
|
|
|
|
use Test::Command tests => 18;
|
|
|
|
use Test::Command tests => 18;
|
|
|
|
|
|
|
|
use Test::More;
|
|
|
|
|
|
|
|
|
|
|
|
# -R random bytes
|
|
|
|
# -R random bytes
|
|
|
|
# -r n number of retries (default 3)
|
|
|
|
# -r n number of retries (default 3)
|
|
|
@ -17,12 +18,14 @@ $cmd->stdout_is_eq("");
|
|
|
|
$cmd->stderr_like(qr{127\.0\.0\.1 : xmt/rcv/%loss = 3/3/0%.*});
|
|
|
|
$cmd->stderr_like(qr{127\.0\.0\.1 : xmt/rcv/%loss = 3/3/0%.*});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# fping6 -R
|
|
|
|
SKIP: {
|
|
|
|
{
|
|
|
|
if(system("/sbin/ifconfig | grep inet6") != 0) {
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping6 -q -R -c3 -p100 ::1");
|
|
|
|
skip 'No IPv6 on this host', 3;
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
}
|
|
|
|
$cmd->stdout_is_eq("");
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping6 -q -R -c3 -p100 ::1");
|
|
|
|
$cmd->stderr_like(qr{::1 : xmt/rcv/%loss = 3/3/0%.*});
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
|
|
|
|
$cmd->stdout_is_eq("");
|
|
|
|
|
|
|
|
$cmd->stderr_like(qr{::1 : xmt/rcv/%loss = 3/3/0%.*});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# fping -r tested in test-4-options-a-b.pl
|
|
|
|
# fping -r tested in test-4-options-a-b.pl
|
|
|
@ -82,11 +85,14 @@ $cmd->stderr_is_eq("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# fping6 -S
|
|
|
|
# fping6 -S
|
|
|
|
{
|
|
|
|
SKIP: {
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping6 -S ::1 ::1");
|
|
|
|
if(system("/sbin/ifconfig | grep inet6") != 0) {
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
skip 'No IPv6 on this host', 3;
|
|
|
|
$cmd->stdout_is_eq("::1 is alive\n");
|
|
|
|
}
|
|
|
|
$cmd->stderr_is_eq("");
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping6 -S ::1 ::1");
|
|
|
|
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
|
|
|
|
$cmd->stdout_is_eq("::1 is alive\n");
|
|
|
|
|
|
|
|
$cmd->stderr_is_eq("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# fping -t tested in test-4-options-a-b.pl
|
|
|
|
# fping -t tested in test-4-options-a-b.pl
|
|
|
|