summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/chains/0003jump_loop_1
Commit message (Collapse)AuthorAgeFilesLines
* tests: shell: connect chains to hook pointFlorian Westphal2024-07-111-1/+2
| | | | | | | | | | | | | | These tests should fail because they contain a loop or exceed the jump stack. But this depends on the kernel validating chains that are not bound to any basechain/hook point. Wire up the initial chain to filter type. Without this tests will start to fail when kernel stops validating chains that are not reachable by any base chain. Signed-off-by: Florian Westphal <fw@strlen.de>
* tests: shell: change all test scripts to return 0Florian Westphal2019-01-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shell-based tests currently encode a return value in the file name, i.e. foo_1 expects that the script should return '1' for the test case to pass. This is very error prone, and one test case is even broken (i.e., it returns 1, but because of a different, earlier error). do_something || exit 1 or 'set -e' are both pretty common patterns, in both cases tests should fail. In those test-cases that deliberately test for an error, nft something_should_fail || exit 0 nft something_should_fail && exit 1 or a similar constructs should be used. This initial commit modififies all '_1' scripts to return 0 on success, usually via 'nft wrong || exit 0'. All tests pass, except the one broken test case that hasn't worked before either, but where 'set -e' use made it pass (the failing command is supposed to work, and the command that is supposed to fail is never run). Signed-off-by: Florian Westphal <fw@strlen.de>
* tests/shell: add chain validations testsArturo Borrero2016-03-231-0/+21
Some basic test regarding chains: jumps and validations. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>