From 17fae97801b59caec8fe50588f2cc61cd99c22af Mon Sep 17 00:00:00 2001 From: Erik Auerswald Date: Sun, 28 Jul 2024 19:41:43 +0200 Subject: [PATCH] test --print-tos without -O Printing the TOS byte of the received Echo response does not require setting a non-default TOS byte value in the Echo request. --- ci/test-08-options-n-q.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ci/test-08-options-n-q.pl b/ci/test-08-options-n-q.pl index 7e879ab..5e14853 100755 --- a/ci/test-08-options-n-q.pl +++ b/ci/test-08-options-n-q.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Test::Command tests => 39; +use Test::Command tests => 42; # -n show targets by name (-d is equivalent) # -O n set the type of service (tos) flag on the ICMP packets @@ -57,6 +57,15 @@ $cmd->stdout_like(qr{127\.0\.0\.1 is alive \(TOS \d+\) $cmd->stderr_is_eq(""); } +# fping --print-tos +{ +my $cmd = Test::Command->new(cmd => "fping --print-tos 127.0.0.1"); +$cmd->exit_is_num(0); +$cmd->stdout_like(qr{127\.0\.0\.1 is alive \(TOS 0\) +}); +$cmd->stderr_is_eq(""); +} + # fping -q { my $cmd = Test::Command->new(cmd => "fping -q -p 100 -c 3 127.0.0.1"); -- 2.43.0