}
sub test_unprivileged_works {
- plan tests => 15;
+ plan tests => 18;
{
my $cmd = Test::Command->new(cmd => "$fping_copy 127.0.0.1");
$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;