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.
pull/301/head
Erik Auerswald 11 months ago committed by David Schweikert
parent ef74f642d1
commit d312a278d5

@ -1,6 +1,6 @@
#!/usr/bin/perl -w
use Test::Command tests => 9;
use Test::Command tests => 12;
use Test::More;
# ping 127.0.0.1
@ -23,6 +23,18 @@ SKIP: {
$cmd->stderr_is_eq("");
}
# ping ff02::1
SKIP: {
#system("/sbin/ifconfig >&2");
if($ENV{SKIP_IPV6}) {
skip 'Skip IPv6 tests', 3;
}
my $cmd = Test::Command->new(cmd => "fping ff02::1");
$cmd->exit_is_num(0);
$cmd->stdout_is_eq("ff02::1 is alive\n");
$cmd->stderr_like(qr{ \[<- .*\]});
}
# ping 3 times 127.0.0.1
{
my $cmd = Test::Command->new(cmd => "fping -p 100 -C3 127.0.0.1");

Loading…
Cancel
Save