Skip to content

Commit

Permalink
basic test for -d, --rdns
Browse files Browse the repository at this point in the history
Usually, -d gives the same result as -n.  Test this.

When the target is a name that resolves to an IP, but the IP
does not resolve to the same name or any name at all, the
output differs.  This is harder to test, because this is
usually seen as a misconfiguration, so leave this out for now.
  • Loading branch information
auerswal authored and schweikert committed Aug 1, 2024
1 parent 68d0ec1 commit 43a99b8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ci/test-05-options-c-e.pl
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/perl -w

use Test::Command tests => 69;
use Test::Command tests => 72;
use Test::More;

# -c n count of pings to send to each target (default 1)
# -C n same as -c, report results in verbose format
# --check-source discard replies not from target address
# -d reverse name lookup
# -D print timestamp before each output line
# -e show elapsed time on return packets

Expand Down Expand Up @@ -202,6 +203,14 @@
});
}

# fping -d
{
my $cmd = Test::Command->new(cmd => "fping -d 127.0.0.1");
$cmd->exit_is_num(0);
$cmd->stdout_is_eq("localhost is alive\n");
$cmd->stderr_is_eq("");
}

# fping -D
{
my $cmd = Test::Command->new(cmd => "fping -D -c 2 -p 100 127.0.0.1");
Expand Down

0 comments on commit 43a99b8

Please sign in to comment.