The list is constructed randonly, its possible that it is empty. When this happens, the test fails. Skip this instead if that happens. Signed-off-by: Florian Westphal --- tests/shell/helpers/set_match_nomatch_helpers | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/shell/helpers/set_match_nomatch_helpers b/tests/shell/helpers/set_match_nomatch_helpers index 35114895c68c..04c3f8465bf0 100644 --- a/tests/shell/helpers/set_match_nomatch_helpers +++ b/tests/shell/helpers/set_match_nomatch_helpers @@ -301,11 +301,9 @@ test_nomatch() wait - [ "$psent" -eq 0 ] && exit_fatal "empty nomatch list" - if ip netns exec "$R" $NFT list set ip test s | grep -q 'counter packets 1' ; then ip netns exec "$R" $NFT list set ip test s - exit_fatal "Unexpected entry listed as matching" + exit_fatal "Unexpected entry listed as matching, sent $psent packets." fi if ip netns exec "$R" $NFT list counter ip test nomatch | grep -q "packets $psent"; then -- 2.53.0