From fde3f0728798b30527d40e7e59d44502cfb8a695 Mon Sep 17 00:00:00 2001 From: German Service Network Date: Sun, 22 Mar 2026 09:44:43 +0100 Subject: [PATCH] Add IPv6 test for --oiface --- ci/test-07-options-i-m.pl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ci/test-07-options-i-m.pl b/ci/test-07-options-i-m.pl index 3bb3169..938d2a2 100755 --- a/ci/test-07-options-i-m.pl +++ b/ci/test-07-options-i-m.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Test::Command tests => 28; +use Test::Command tests => 31; use Test::More; # -i n interval between sending ping packets (in millisec) (default 25) @@ -65,6 +65,20 @@ $cmd->stdout_is_eq("127.0.0.1 is alive\n"); $cmd->stderr_is_eq(""); } +# fping --oiface=IFACE (IPv6) +SKIP: { + if($^O ne 'linux') { + skip '--oiface option functionality is only tested on Linux', 3; + } + if($ENV{SKIP_IPV6}) { + skip 'Skip IPv6 tests', 3; + } + my $cmd = Test::Command->new(cmd => 'fping -6 --oiface=lo ::1'); + $cmd->exit_is_num(0); + $cmd->stdout_is_eq("::1 is alive\n"); + $cmd->stderr_is_eq(""); +} + # fping -l { my $cmd = Test::Command->new(cmd => '(sleep 0.5; pkill -INT fping)& fping -p 100 -l 127.0.0.1'); -- 2.43.0