selftests: forwarding: bail_on_lldpad() should SKIP

JIRA: https://issues.redhat.com/browse/RHEL-57739

commit 492976136bb9fac0ebda28a163561eea8c2896d5
Author: Petr Machata <petrm@nvidia.com>
Date:   Fri Apr 12 19:03:06 2024 +0200

    selftests: forwarding: bail_on_lldpad() should SKIP

    $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>

Signed-off-by: Jamie Bainbridge <jbainbri@redhat.com>
This commit is contained in:
Jamie Bainbridge 2024-09-06 17:02:55 +10:00
parent 3059f3d026
commit 19911f146d
1 changed files with 4 additions and 1 deletions

View File

@ -2101,6 +2101,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
@ -2121,7 +2123,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