Get rid of warning "timeout (-t) value larger than period (-p) produces unexpected results", fixes #142

pull/145/head
David Schweikert 6 years ago
parent 633ea983ed
commit a4522f1af2

@ -15,6 +15,9 @@ fping 4.2 (UNRELEASED)
embedded-distro use cases, and not meant to be used generally in place of
compiling IPv6-only binary or using '-6', see also the notes in #139, thanks
abelbeck)
- Get rid of warning "timeout (-t) value larger than period (-p) produces unexpected results"
(#142, thanks @MrDragon1122)
fping 4.1 (2018-09-17)
======================

@ -1,6 +1,6 @@
#!/usr/bin/perl -w
use Test::Command tests => 23;
use Test::Command tests => 21;
use Test::More;
# -R random bytes
@ -104,9 +104,3 @@ $cmd->stderr_is_eq("fping: can't parse source address: bla\n");
}
# (note: fping -t also tested in test-4-options-a-b.pl)
{
my $cmd = Test::Command->new(cmd => "fping -c 2 -p 100 -t 200 127.0.0.1");
$cmd->exit_is_num(0);
$cmd->stderr_like(qr{^fping: warning: timeout \(-t\) value larger than period \(-p\) produces unexpected results\n.*});
}

@ -785,11 +785,6 @@ int main(int argc, char** argv)
timeout = AUTOTUNE_TIMEOUT_MAX * 100;
}
}
else {
if (timeout > perhost_interval && (loop_flag || (count_flag && count > 1))) {
fprintf(stderr, "%s: warning: timeout (-t) value larger than period (-p) produces unexpected results\n", prog);
}
}
}
#if defined(DEBUG) || defined(_DEBUG)

Loading…
Cancel
Save