]> git.gsnw.org Git - fping.git/commitdiff
test-05: don't assume -D timestamp is based on UNIX epoch
authorSteven Noonan <steven@uplinklabs.net>
Thu, 27 Feb 2020 21:51:50 +0000 (13:51 -0800)
committerSteven Noonan <steven@uplinklabs.net>
Wed, 10 Jun 2020 00:52:20 +0000 (17:52 -0700)
If CLOCKID != CLOCK_REALTIME, it probably will not have anything to do
with the UNIX epoch, so it could be smaller than 10 digits.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
ci/test-05-options-c-e.pl

index 8bc03d0d4ac5423cef61e1a4255f0f8d19adc2f0..536f3adb622f5a1a26c9afeb9f7f88d89192c169 100755 (executable)
@@ -41,8 +41,8 @@ $cmd->stderr_like(qr{localhost : \d\.\d+ \d\.\d+
 {
 my $cmd = Test::Command->new(cmd => "fping -D -c 2 -p 100 127.0.0.1");
 $cmd->exit_is_num(0);
-$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, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
+$cmd->stdout_like(qr{\[\d+\.\d+\] 127\.0\.0\.1 : \[0\], 84 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
+\[\d+\.\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 = \d\.\d+/\d\.\d+/\d\.\d+