|
|
@ -11,14 +11,14 @@ use Test::Command tests => 12;
|
|
|
|
{
|
|
|
|
{
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping -4 -c 2 -p 100 localhost 127.0.0.1");
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping -4 -c 2 -p 100 localhost 127.0.0.1");
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
$cmd->stdout_like(qr{localhost : \[0\], 84 bytes, 0\.\d+ ms \(0\.\d+ avg, 0% loss\)
|
|
|
|
$cmd->stdout_like(qr{localhost : \[0\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
|
|
|
|
127\.0\.0\.1 : \[0\], 84 bytes, 0\.\d+ ms \(0.\d+ avg, 0% loss\)
|
|
|
|
127\.0\.0\.1 : \[0\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
|
|
|
|
localhost : \[1\], 84 bytes, 0\.\d+ ms \(0\.\d+ avg, 0% loss\)
|
|
|
|
localhost : \[1\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
|
|
|
|
127\.0\.0\.1 : \[1\], 84 bytes, 0\.\d+ ms \(0\.\d+ avg, 0% loss\)
|
|
|
|
127\.0\.0\.1 : \[1\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$cmd->stderr_like(qr{localhost : xmt/rcv/%loss = 2/2/0%, min/avg/max = 0\.\d+/0\.\d+/0\.\d+
|
|
|
|
$cmd->stderr_like(qr{localhost : xmt/rcv/%loss = 2/2/0%, min/avg/max = \d\.\d+/\d\.\d+/\d\.\d+
|
|
|
|
127\.0\.0\.1 : xmt/rcv/%loss = 2/2/0%, min/avg/max = 0\.\d+/0\.\d+/0\.\d+
|
|
|
|
127\.0\.0\.1 : xmt/rcv/%loss = 2/2/0%, min/avg/max = \d\.\d+/\d\.\d+/\d\.\d+
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -26,14 +26,14 @@ $cmd->stderr_like(qr{localhost : xmt/rcv/%loss = 2/2/0%, min/avg/max = 0\.\d+/0\
|
|
|
|
{
|
|
|
|
{
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping -4 -C 2 -p 100 localhost 127.0.0.1");
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping -4 -C 2 -p 100 localhost 127.0.0.1");
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
$cmd->stdout_like(qr{localhost : \[0\], 84 bytes, 0\.\d+ ms \(0\.\d+ avg, 0% loss\)
|
|
|
|
$cmd->stdout_like(qr{localhost : \[0\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
|
|
|
|
127\.0\.0\.1 : \[0\], 84 bytes, 0\.\d+ ms \(0.\d+ avg, 0% loss\)
|
|
|
|
127\.0\.0\.1 : \[0\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
|
|
|
|
localhost : \[1\], 84 bytes, 0\.\d+ ms \(0\.\d+ avg, 0% loss\)
|
|
|
|
localhost : \[1\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
|
|
|
|
127\.0\.0\.1 : \[1\], 84 bytes, 0\.\d+ ms \(0\.\d+ avg, 0% loss\)
|
|
|
|
127\.0\.0\.1 : \[1\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$cmd->stderr_like(qr{localhost : 0\.\d+ 0\.\d+
|
|
|
|
$cmd->stderr_like(qr{localhost : \d\.\d+ \d\.\d+
|
|
|
|
127\.0\.0\.1 : 0\.\d+ 0\.\d+
|
|
|
|
127\.0\.0\.1 : \d\.\d+ \d\.\d+
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -41,11 +41,11 @@ $cmd->stderr_like(qr{localhost : 0\.\d+ 0\.\d+
|
|
|
|
{
|
|
|
|
{
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping -D -c 2 -p 100 127.0.0.1");
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping -D -c 2 -p 100 127.0.0.1");
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
$cmd->stdout_like(qr{\[\d{10}\.\d+\] 127\.0\.0\.1 : \[0\], 84 bytes, 0\.\d+ ms \(0.\d+ avg, 0% loss\)
|
|
|
|
$cmd->stdout_like(qr{\[\d{10}\.\d+\] 127\.0\.0\.1 : \[0\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
|
|
|
|
\[\d{10}\.\d+\] 127\.0\.0\.1 : \[1\], 84 bytes, 0\.\d+ ms \(0\.\d+ avg, 0% loss\)
|
|
|
|
\[\d{10}\.\d+\] 127\.0\.0\.1 : \[1\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$cmd->stderr_like(qr{127\.0\.0\.1 : xmt/rcv/%loss = 2/2/0%, min/avg/max = 0\.\d+/0\.\d+/0\.\d+
|
|
|
|
$cmd->stderr_like(qr{127\.0\.0\.1 : xmt/rcv/%loss = 2/2/0%, min/avg/max = \d\.\d+/\d\.\d+/\d\.\d+
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -53,7 +53,7 @@ $cmd->stderr_like(qr{127\.0\.0\.1 : xmt/rcv/%loss = 2/2/0%, min/avg/max = 0\.\d+
|
|
|
|
{
|
|
|
|
{
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping -e 127.0.0.1");
|
|
|
|
my $cmd = Test::Command->new(cmd => "fping -e 127.0.0.1");
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
$cmd->exit_is_num(0);
|
|
|
|
$cmd->stdout_like(qr{127\.0\.0\.1 is alive \(0\.\d+ ms\)
|
|
|
|
$cmd->stdout_like(qr{127\.0\.0\.1 is alive \(\d\.\d+ ms\)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$cmd->stderr_is_eq("");
|
|
|
|
$cmd->stderr_is_eq("");
|
|
|
|