]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: forwarding: Have lldpad_app_wait_set() wait for unknown, too
authorPetr Machata <petrm@mellanox.com>
Mon, 8 Oct 2018 18:50:41 +0000 (18:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Oct 2018 05:22:07 +0000 (22:22 -0700)
commit27efe8d8fb509a46c28a02011cb6bc954120e7af
treeb23de49df62214bfe2a279f771705f53a5234f14
parent2b63dda185f92b0f3e160104b2c73a63f6111bcf
selftests: forwarding: Have lldpad_app_wait_set() wait for unknown, too

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: b68500fc76b0 ("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>
tools/testing/selftests/net/forwarding/lib.sh