Commit Graph

175 Commits (46793cdf802d76e6202708915fab7c9d1f4c293d)

Author SHA1 Message Date
Erik Auerswald 97b7484350 test error when binding to wrong local address
Test "fping -S" with both IPv4 and IPv6 addresses not configured
on local interfaces using addresses reserved for documentation.
Check the fping error message, but accept any system generated
additional information.  This additional information differs
between operation systems.
5 months ago
Erik Auerswald 79e274d4b8 test help output during normal option parsing
The existing test for "fping -h" triggers the special code path
for only one option, either -h or --help, that is handled before
normal option parsing.
5 months ago
Erik Auerswald 90ad83fbd0 Print cumulative stats with -Q SECS,cumulative
With -Q SECS, fping emits information for the just finished
interval.  This is good for long-running fping processes where
one would like to get an update on recent results, ignoring
missing responses from older intervals.  This seems appropriate
for use with other software like netdata or smokeping.

But for short(er)-running fping processes, e.g., during a change
window, it may be more interesting to get a status update since
the beginning of the change window, i.e., the start of fping.
Adding a comma followed by the keyword "cumulative" to -Q SECS
(i.e., -Q SECS,cumulative) changes the interim reports to output
the current per system overall statistics, unless -N is used, too.

The new syntax is documented in fping.pod and added to fping -h
output.

Four tests are added:

  1. Characters after SECS are ignored as before.
  2. Unknown keywords are ignored as before.
  2. Adding ",cumulative" changes -Q output.
  3. Adding ",cumulative" also affects the additional -o output.

This addresses issue #243.
6 months ago
David Schweikert ab05279782 Fix number of tests 7 months ago
David Schweikert d6d9c653eb Remove flaky test for now.
Remove the 'fping -X 2 --generate 8.8.0.0/29' test, because it
is currently failing on the MacOS runner. Also, I am not sure that
it is a good idea to ping the IPs 8.8.0.1 and 8.8.0.2 and rely on
them being up.
7 months ago
Erik Auerswald 1443614dad Decouple -a/-u effects from -c
As described in issue #295, the option combinations "-c N -u"
and "-c N -a" inadvertently have the same effect as "-c N -q".
Prevent this by first acting on -c, which includes disabling
either -a or -u, if -c is given, before acting on -a/-u.
9 months ago
Erik Auerswald d312a278d5 Test ping to "all IPv6 nodes" multicast address
Any Echo Response packet uses a different source address than
used for the target, because it is not allowed to use a multicast
address as source.  This results in extra output in a specific
format on standard error.

This should work, because IPv6 requires multicast support, and
every IPv6 node is supposed to join the "all nodes" multicast
group, including the node the test runs on.  It at least works
on my Ubuntu 20.04 LTS system.
9 months ago
Erik Auerswald ef74f642d1 Test edge cases of -f and -g
* -f with non-existing file
* -f with input file containing comment and empty line
* -g with non-numeric address in "CIDR" format
* -g with one non-numeric address in start resp. end position
* -g with one IPv6 address in start resp. end position
9 months ago
Erik Auerswald 32b9a55a98 Test -l together with -Q or -t 9 months ago
Erik Auerswald dcda0cc595 Test that -x, -X, -k require numeric argument 9 months ago
Erik Auerswald c5428391a6 Test that negative numbers are not accepted 9 months ago
Erik Auerswald 8ae2babae0 Fix a comment describing a test 9 months ago
Erik Auerswald 2a609b856d Test examples from man page
The man page gives two examples combining -C and -q, but
these combinations are not yet tested.  Add tests to help
ensure the documented examples continue to work.
10 months ago
Erik Auerswald 3a527fbc86 Add test for option combination -Q SECS -o
The -o option adds outage duration to the periodic reports.
Each report shows the outage since the last report, not since
the beginning.
10 months ago
Erik Auerswald 4753437b17 Add longer test for -Q SECS
The statistics printed every SECS seconds show the results
since the the last report, not since the beginning.  Also,
every report starts with a timestamp.
10 months ago
Erik Auerswald ccc0cdfdd7 Test that -g does not accept IPv6 10 months ago
Erik Auerswald 2fa4f61079 Test edge case behavior of "fping -g"
* wrong number or kind of arguments fails and prints usage;
* an empty range silently pings nothing and fping returns 1;
* a too large range fails with an error message;
* a zero CIDR prefix length fails with an error message.
10 months ago
deepkv c8e9632150 Add --fwmark/-k option for Linux 10 months ago
German Service Network 59f32cefb2 Repair the faulty test 15 1 year ago
German Service Network f94adaf29e Test for fping: add option to exit immediately once N hosts have been found 1 year ago
David Schweikert e975a4339b fix unprivileged ping broken in v5.1 (fixes #248) 3 years ago
David Schweikert ae49f4d933 Update autotools and fix code coverage issues. 3 years ago
David Schweikert 3ecfbb7c1e GH action test 3 years ago
David Schweikert bbaa365526 more travis stability fixes 3 years ago
David Schweikert cf03fa5bdb skip timing test on macos 3 years ago
David Schweikert 7b3cf2593a fix travis build 3 years ago
David Schweikert aeea60a0e0 move coverity scan to a script, so that it doesn't run for every job 4 years ago
David Schweikert 2dbe46f936 remove debug output 4 years ago
David Schweikert 73bfc121c2 more travis-ci improvements 4 years ago
David Schweikert 5655b7664c travis-ci improvements 4 years ago
David Schweikert 2f71a6a701 travis-ci improvements, add macos testing 4 years ago
David Schweikert a136764f8c always exclude IP header in returned size 4 years ago
David Schweikert 43f6e3498e print lost pings in loop and count mode, fixes #175 4 years ago
David Schweikert bb8d71ef27 refactored event loop, now for each ping we create both a ping and a timeout event 4 years ago
David Schweikert 9731556633 prepare for version 5.x 4 years ago
David Schweikert 721af135db
Merge pull request #136 from tycho/high-resolution-clock-sources
Move to 1us resolution for latency measurements
4 years ago
Patrick Ladd e064c36df8 Add SIGQUIT summary support similar to ping
This reverts commit 3b3877f651af816006ab620f7a189c2c1a3fad8a.
4 years ago
Steven Noonan ad451e7a15
test-05: don't assume -D timestamp is based on UNIX epoch
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>
4 years ago
Steven Noonan 754a21e2bd
move to 1us resolution for latency measurement
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
4 years ago
Steven Noonan 44dd04562c
test-11-nopriv: check Linux GID permission for unprivileged ping
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
5 years ago
David Schweikert 12961d59ec fix google dns names 5 years ago
David Schweikert 151fef9312 fix internet test that uses a name with multiple a records 6 years ago
David Schweikert a4522f1af2 Get rid of warning "timeout (-t) value larger than period (-p) produces unexpected results", fixes #142 6 years ago
David Schweikert 633ea983ed test robustness fixes 6 years ago
deepak0004 03d821e983 Removing flag variable and its dependencies, printing required and reachable hosts, and changing initialisation of min_reachable 6 years ago
deepak0004 af9b3bfbfe Adding separate exit codes for success or failure, and printing the number of reachable hosts 6 years ago
deepak0004 8e33daed93 Adding travis ci tests for more coverage and rectifying a mistake 6 years ago
David Schweikert d46f298e62 fix test-14-ping-internet-hosts.pl failing 7 years ago
David Schweikert bb0eeaaeba Fix running on servers with disabled IPv6, fixes #118 7 years ago
David Schweikert 41de489bd8 fix test 8 years ago