summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/0036add_set_element_expiration_0
Commit message (Collapse)AuthorAgeFilesLines
* tests: shell: skip if kernel does not allow to restore set element expirationPablo Neira Ayuso2023-11-221-0/+2
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* tests: shell: fix spurious errors in sets/0036add_set_element_expiration_0Pablo Neira Ayuso2023-09-271-3/+7
| | | | | | | | | | | | | | | A number of changes to fix spurious errors: - Add seconds as expiration, otherwise 14m59 reports 14m in minute granularity, this ensures suficient time in a very slow environment with debugging instrumentation. - Provide expected output. - Update sed regular expression to make 'ms' optional and use -E mode. Fixes: adf38fd84257 ("tests: shell: use minutes granularity in sets/0036add_set_element_expiration_0") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* tests: shell: use minutes granularity in sets/0036add_set_element_expiration_0Pablo Neira Ayuso2023-08-231-2/+6
| | | | | | | Use minute granularity to fix bogus failures of this test on slow testbed. Acked-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* tests/shell: Improve fix in sets/0036add_set_element_expiration_0Phil Sutter2020-10-311-1/+1
| | | | | | | | | | 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>
* Revert "monitor: do not print generation ID with --echo"Pablo Neira Ayuso2020-10-231-1/+1
| | | | | | | | | | | | | Revert 0e258556f7f3 ("monitor: do not print generation ID with --echo"). There is actually a kernel bug which is preventing from displaying this generation ID message. Update the tests/shell to remove the last line of the --echo output which displays the generation ID once the "netfilter: nftables: fix netlink report logic in flowtable and genid" kernel fix is applied. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* tests: shell: Search diff tool once and for allPhil Sutter2020-01-161-1/+4
| | | | | | | | | | | | | | | Instead of calling 'which diff' over and over again, just detect the tool's presence in run-tests.sh and pass $DIFF to each testcase just like with nft binary. Fall back to using 'true' command to avoid the need for any conditional calling in test cases. While being at it, unify potential diff calls so that a string comparison in shell happens irrespective of diff presence. Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
* tests: check we can use "dynamic" set for lookupsFlorian Westphal2019-10-071-0/+2
| | | | | | | | Requires kernel commit acab713177377 ("netfilter: nf_tables: allow lookups in dynamic sets"), else the rule add will fail. Signed-off-by: Florian Westphal <fw@strlen.de>
* tests: shell: make sure we test nft binary from working tree, not hostFlorian Westphal2019-07-151-2/+0
| | | | | | | This tests the installed host nft binary, which fails on my test vm. Using the one from the working tree makes this test pass. Signed-off-by: Florian Westphal <fw@strlen.de>
* tests: shell: restore element expirationPablo Neira Ayuso2019-07-011-0/+13
This patch adds a test for 24f33c710e8c ("src: enable set expiration date for set elements"). This is also implicitly testing for a cache corruption bug that is fixed by 9b032cd6477b ("monitor: fix double cache update with --echo"). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>