]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests: traceroute: Use require_command()
authorIdo Schimmel <idosch@nvidia.com>
Mon, 8 Sep 2025 07:32:35 +0000 (10:32 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 11 Sep 2025 10:22:38 +0000 (12:22 +0200)
commit47efbac9b768553331b9459743a29861e0acd797
tree90f4b511a5fb3986c7dcba02c5d17b1638babe91
parentc068ba9d3ded56cb1ba4d5135ee84bf8039bd563
selftests: traceroute: Use require_command()

Use require_command() so that the test will return SKIP (4) when a
required command is not present.

Before:

 # ./traceroute.sh
 SKIP: Could not run IPV6 test without traceroute6
 SKIP: Could not run IPV4 test without traceroute
 $ echo $?
 0

After:

 # ./traceroute.sh
 TEST: traceroute6 not installed                                    [SKIP]
 $ echo $?
 4

Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250908073238.119240-6-idosch@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/traceroute.sh