Skip to content

Commit

Permalink
selftests: forwarding: bail_on_lldpad() should SKIP
Browse files Browse the repository at this point in the history
$ksft_skip is used to mark selftests that have tooling issues. The fact
that LLDPad is running, but shouldn't, is one such issue. Therefore have
bail_on_lldpad() bail with $ksft_skip.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Benjamin Poirier <bpoirier@nvidia.com>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Petr Machata authored and Paolo Abeni committed Apr 16, 2024
1 parent 2291752 commit 4929761
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/testing/selftests/net/forwarding/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2138,6 +2138,8 @@ bail_on_lldpad()
{
local reason1="$1"; shift
local reason2="$1"; shift
local caller=${FUNCNAME[1]}
local src=${BASH_SOURCE[1]}

if systemctl is-active --quiet lldpad; then

Expand All @@ -2158,7 +2160,8 @@ bail_on_lldpad()
an environment variable ALLOW_LLDPAD to a
non-empty string.
EOF
exit 1
log_test_skip $src:$caller
exit $EXIT_STATUS
else
return
fi
Expand Down

0 comments on commit 4929761

Please sign in to comment.