summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-10-29 13:35:55 +0100
committerPhil Sutter <phil@nwl.cc>2020-10-31 14:12:33 +0100
commita1e3a5d4a4e24db9a3511a32ff72e830b4c06ddd (patch)
tree47636d605c0a5851c8d08901c3bd3bea160b4076 /tests
parent673b9d3f2630f812bcef95666a1097747844c92b (diff)
tests/shell: Improve fix in sets/0036add_set_element_expiration_0
Explicitly eliminate the newgen message from output instead of just the last line to make sure no other output is dropped by accident. This also allows the test to pass in unpatched kernels which do not emit the newgen message despite NLM_F_ECHO if no netlink listeners are present. Fixes: 46b54fdcf266d ("Revert "monitor: do not print generation ID with --echo"") Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shell/testcases/sets/0036add_set_element_expiration_02
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/shell/testcases/sets/0036add_set_element_expiration_0 b/tests/shell/testcases/sets/0036add_set_element_expiration_0
index 7b2e39a3..3097d077 100755
--- a/tests/shell/testcases/sets/0036add_set_element_expiration_0
+++ b/tests/shell/testcases/sets/0036add_set_element_expiration_0
@@ -6,7 +6,7 @@ RULESET="add table ip x
add set ip x y { type ipv4_addr; flags dynamic,timeout; }
add element ip x y { 1.1.1.1 timeout 30s expires 15s }"
-test_output=$($NFT -e -f - <<< "$RULESET" 2>&1 | head -n -1)
+test_output=$($NFT -e -f - <<< "$RULESET" 2>&1 | grep -v '# new generation')
if [ "$test_output" != "$RULESET" ] ; then
$DIFF -u <(echo "$test_output") <(echo "$RULESET")