All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<edumazet@google.com>, <petrm@nvidia.com>, <razor@blackwall.org>,
	<mirsad.todorovac@alu.unizg.hr>, Ido Schimmel <idosch@nvidia.com>,
	<ssuryaextr@gmail.com>
Subject: [PATCH net v2 05/17] selftests: forwarding: Set default IPv6 traceroute utility
Date: Tue, 8 Aug 2023 17:14:51 +0300	[thread overview]
Message-ID: <20230808141503.4060661-6-idosch@nvidia.com> (raw)
In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com>

The test uses the 'TROUTE6' environment variable to encode the name of
the IPv6 traceroute utility. By default (without a configuration file),
this variable is not set, resulting in failures:

 # ./ip6_forward_instats_vrf.sh
 TEST: ping6                                                         [ OK ]
 TEST: Ip6InTooBigErrors                                             [ OK ]
 TEST: Ip6InHdrErrors                                                [FAIL]
 TEST: Ip6InAddrErrors                                               [ OK ]
 TEST: Ip6InDiscards                                                 [ OK ]

Fix by setting a default utility name and skip the test if the utility
is not present.

Fixes: 0857d6f8c759 ("ipv6: When forwarding count rx stats on the orig netdev")
Reported-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
---
Cc: ssuryaextr@gmail.com
---
 .../testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh | 2 ++
 tools/testing/selftests/net/forwarding/lib.sh                   | 1 +
 2 files changed, 3 insertions(+)

diff --git a/tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh b/tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh
index 9f5b3e2e5e95..49fa94b53a1c 100755
--- a/tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh
+++ b/tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh
@@ -14,6 +14,8 @@ ALL_TESTS="
 NUM_NETIFS=4
 source lib.sh
 
+require_command $TROUTE6
+
 h1_create()
 {
 	simple_if_init $h1 2001:1:1::2/64
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 975fc5168c63..40a8c1541b7f 100755
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -30,6 +30,7 @@ REQUIRE_MZ=${REQUIRE_MZ:=yes}
 REQUIRE_MTOOLS=${REQUIRE_MTOOLS:=no}
 STABLE_MAC_ADDRS=${STABLE_MAC_ADDRS:=no}
 TCPDUMP_EXTRA_FLAGS=${TCPDUMP_EXTRA_FLAGS:=}
+TROUTE6=${TROUTE6:=traceroute6}
 
 relative_path="${BASH_SOURCE%/*}"
 if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then
-- 
2.40.1


  parent reply	other threads:[~2023-08-08 15:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 14:14 [PATCH net v2 00/17] selftests: forwarding: Various fixes Ido Schimmel
2023-08-08 14:14 ` [PATCH net v2 01/17] selftests: forwarding: Skip test when no interfaces are specified Ido Schimmel
2023-08-08 14:14 ` [PATCH net v2 02/17] selftests: forwarding: Switch off timeout Ido Schimmel
2023-08-08 14:14 ` [PATCH net v2 03/17] selftests: forwarding: bridge_mdb: Check iproute2 version Ido Schimmel
2023-08-08 14:14 ` [PATCH net v2 04/17] selftests: forwarding: bridge_mdb_max: " Ido Schimmel
2023-08-08 14:14 ` Ido Schimmel [this message]
2023-08-08 14:14 ` [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs Ido Schimmel
2023-08-09  1:55   ` Hangbin Liu
2023-08-09  5:47     ` Ido Schimmel
2023-08-09  6:46       ` Hangbin Liu
2023-08-08 14:14 ` [PATCH net v2 07/17] selftests: forwarding: ethtool: Skip " Ido Schimmel
2023-08-08 14:14 ` [PATCH net v2 08/17] selftests: forwarding: ethtool_extended_state: " Ido Schimmel
2023-08-08 14:14 ` [PATCH net v2 09/17] selftests: forwarding: hw_stats_l3_gre: " Ido Schimmel
2023-08-09  2:02   ` Hangbin Liu
2023-08-09  5:45     ` Ido Schimmel
2023-08-08 14:14 ` [PATCH net v2 10/17] selftests: forwarding: ethtool_mm: Skip when MAC Merge is not supported Ido Schimmel
2023-08-10 17:28   ` Vladimir Oltean
2023-08-08 14:14 ` [PATCH net v2 11/17] selftests: forwarding: tc_actions: Use ncat instead of nc Ido Schimmel
2023-08-08 14:14 ` [PATCH net v2 12/17] selftests: forwarding: tc_flower: Relax success criterion Ido Schimmel
2023-08-08 14:14 ` [PATCH net v2 13/17] selftests: forwarding: tc_tunnel_key: Make filters more specific Ido Schimmel
2023-08-08 14:15 ` [PATCH net v2 14/17] selftests: forwarding: tc_flower_l2_miss: Fix failing test with old libnet Ido Schimmel
2023-08-08 14:15 ` [PATCH net v2 15/17] selftests: forwarding: bridge_mdb: " Ido Schimmel
2023-08-08 14:15 ` [PATCH net v2 16/17] selftests: forwarding: bridge_mdb_max: " Ido Schimmel
2023-08-08 14:15 ` [PATCH net v2 17/17] selftests: forwarding: bridge_mdb: Make test more robust Ido Schimmel
2023-08-09  6:47 ` [PATCH net v2 00/17] selftests: forwarding: Various fixes Hangbin Liu
2023-08-09 12:10 ` Nikolay Aleksandrov
2023-08-09 22:00 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230808141503.4060661-6-idosch@nvidia.com \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=mirsad.todorovac@alu.unizg.hr \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.org \
    --cc=ssuryaextr@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.