From d312a278d5a51c4950b27a4c3bbe3ae888eef4d8 Mon Sep 17 00:00:00 2001 From: Erik Auerswald Date: Tue, 6 Feb 2024 21:55:09 +0100 Subject: [PATCH] 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. --- ci/test-01-basics.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ci/test-01-basics.pl b/ci/test-01-basics.pl index ba12059..309728c 100755 --- a/ci/test-01-basics.pl +++ b/ci/test-01-basics.pl @@ -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");