selftests: forwarding: Change inappropriate log_test_skip() calls

The SKIP return should be used for cases where tooling of the machine under
test is lacking. For cases where HW is lacking, the appropriate outcome is
XFAIL.

This is the case with ethtool_rmon and mlxsw_lib. For these, introduce a
new helper, log_test_xfail().

Do the same for router_mpath_nh_lib. Note that it will be fixed using a
more reusable way in a following patch.

For the two resource_scale selftests, the log should simply not be written,
because there is no problem.

Cc: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Link: https://lore.kernel.org/r/3d668d8fb6fa0d9eeb47ce6d9e54114348c7c179.1711464583.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Petr Machata
2024-03-26 17:54:34 +01:00
committed by Jakub Kicinski
parent 0c499a3517
commit 677f394956
6 changed files with 13 additions and 6 deletions
@@ -467,6 +467,15 @@ log_test_skip()
return 0
}
log_test_xfail()
{
local test_name=$1
local opt_str=$2
printf "TEST: %-60s [XFAIL]\n" "$test_name $opt_str"
return 0
}
log_info()
{
local msg=$1