summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-10-08 21:50:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-24 10:21:02 +0300
commitb80939a47413c08e1756e437c435e57ffe4b87d9 (patch)
tree7b37f1b0a2da97818af52af651653a39a41797ed /tools
parenta119952d4be6ed23c9951e1abbf32e3652ca4add (diff)
downloadlinux-b80939a47413c08e1756e437c435e57ffe4b87d9.tar.xz
selftests: forwarding: Have lldpad_app_wait_set() wait for unknown, too
[ Upstream commit 372809055f6c830ff978564e09f58bcb9e9b937c ] Immediately after mlxsw module is probed and lldpad started, added APP entries are briefly in "unknown" state before becoming "pending". That's the state that lldpad_app_wait_set() typically sees, and since there are no pending entries at that time, it bails out. However the entries have not been pushed to the kernel yet at that point, and thus the test case fails. Fix by waiting for both unknown and pending entries to disappear before proceeding. Fixes: d159261f3662 ("selftests: mlxsw: Add test for trust-DSCP") Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/net/forwarding/lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index ca53b539aa2d..08bac6cf1bb3 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -251,7 +251,7 @@ lldpad_app_wait_set()
{
local dev=$1; shift
- while lldptool -t -i $dev -V APP -c app | grep -q pending; do
+ while lldptool -t -i $dev -V APP -c app | grep -Eq "pending|unknown"; do
echo "$dev: waiting for lldpad to push pending APP updates"
sleep 5
done