$cmd->stdout_is_eq("127.0.0.1 is alive (TTL unknown)\n");
$cmd->stderr_is_eq("");
}
- SKIP: {
- if($^O ne 'linux') {
- skip '-k option is only supported on Linux', 3;
- }
- my $cmd = Test::Command->new(cmd => "$fping_copy -4 -k 256 127.0.0.1");
- $cmd->exit_is_num(0);
- $cmd->stdout_is_eq("127.0.0.1 is alive\n");
- $cmd->stderr_like(qr{fwmark ipv4: .+\n});
- }
SKIP: {
if($^O ne 'linux') {
skip '-k option is only supported on Linux', 3;
$cmd->stdout_is_eq("::1 is alive\n");
$cmd->stderr_like(qr{fwmark ipv6: .+\n});
}
+ SKIP: {
+ if($^O ne 'linux') {
+ skip 'testing --icmp-timestamp option only works on Linux', 3;
+ }
+ my $cmd = Test::Command->new(cmd => "$fping_copy --icmp-timestamp 127.0.0.1");
+ $cmd->exit_is_num(1);
+ $cmd->stdout_is_eq("127.0.0.1 is unreachable\n");
+ $cmd->stderr_like(qr{127.0.0.1: error while sending ping: .+\n});
+ }
}
sub test_privileged_fails {