diff options
Diffstat (limited to 'tests/shell/testcases/transactions')
-rwxr-xr-x | tests/shell/testcases/transactions/0014chain_1 | 5 | ||||
-rwxr-xr-x | tests/shell/testcases/transactions/0022rule_1 | 5 | ||||
-rwxr-xr-x | tests/shell/testcases/transactions/0023rule_1 | 5 | ||||
-rwxr-xr-x | tests/shell/testcases/transactions/0036set_1 | 5 |
4 files changed, 8 insertions, 12 deletions
diff --git a/tests/shell/testcases/transactions/0014chain_1 b/tests/shell/testcases/transactions/0014chain_1 index 802a7e63..cddc8a2e 100755 --- a/tests/shell/testcases/transactions/0014chain_1 +++ b/tests/shell/testcases/transactions/0014chain_1 @@ -1,11 +1,10 @@ #!/bin/bash -set -e - RULESET="add table x add chain x y delete chain x y delete chain x y" -$NFT -f - <<< "$RULESET" 2>/dev/null +$NFT -f - <<< "$RULESET" 2>/dev/null || exit 0 echo "E: allowing double-removal of chain" >&2 +exit 1 diff --git a/tests/shell/testcases/transactions/0022rule_1 b/tests/shell/testcases/transactions/0022rule_1 index 0e7c9a6f..07be53f2 100755 --- a/tests/shell/testcases/transactions/0022rule_1 +++ b/tests/shell/testcases/transactions/0022rule_1 @@ -1,12 +1,11 @@ #!/bin/bash -set -e - RULESET="add table x add chain x y delete chain x y add rule x y jump y" # kernel must return ENOENT -$NFT -f - <<< "$RULESET" 2>/dev/null +$NFT -f - <<< "$RULESET" 2>/dev/null || exit 0 echo "E: allowing jump loop to unexisting chain" +exit 1 diff --git a/tests/shell/testcases/transactions/0023rule_1 b/tests/shell/testcases/transactions/0023rule_1 index edc4e8d2..e58c088c 100755 --- a/tests/shell/testcases/transactions/0023rule_1 +++ b/tests/shell/testcases/transactions/0023rule_1 @@ -1,11 +1,10 @@ #!/bin/bash -set -e - RULESET="add table x add chain x y add rule x y jump y" # kernel must return ELOOP -$NFT -f - <<< "$RULESET" 2>/dev/null +$NFT -f - <<< "$RULESET" 2>/dev/null || exit 0 echo "E: allowing jump to chain loop" +exit 1 diff --git a/tests/shell/testcases/transactions/0036set_1 b/tests/shell/testcases/transactions/0036set_1 index e691fa7f..45d922eb 100755 --- a/tests/shell/testcases/transactions/0036set_1 +++ b/tests/shell/testcases/transactions/0036set_1 @@ -1,13 +1,12 @@ #!/bin/bash -set -e - RULESET="add table x add set x y { type ipv4_addr; } add element x y { 1.1.1.1, 2.2.2.2 } delete element x y { 1.1.1.1 } delete element x y { 1.1.1.1 }" -$NFT -f - <<< "$RULESET" 2> /dev/null +$NFT -f - <<< "$RULESET" 2> /dev/null || exit 0 # Kernel must return ENOENT echo "E: allowing double-removal of element" +exit 1 |