diff mbox series

[nft,2/9] tests: shell: Add test case for jump chain.

Message ID e88173fd5018800db110fa1e36d2103cfabfb3b4.1507696149.git.rvarsha016@gmail.com
State Accepted
Delegated to: Pablo Neira
Headers show
Series tests: Move tests from files to shell. | expand

Commit Message

Varsha Rao Oct. 11, 2017, 4:41 a.m. UTC
This patch adds test case for checking jump to non existing chain.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
 tests/shell/testcases/chains/0015check_jump_loop_1 | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100755 tests/shell/testcases/chains/0015check_jump_loop_1
diff mbox series

Patch

diff --git a/tests/shell/testcases/chains/0015check_jump_loop_1 b/tests/shell/testcases/chains/0015check_jump_loop_1
new file mode 100755
index 0000000..059cfaa
--- /dev/null
+++ b/tests/shell/testcases/chains/0015check_jump_loop_1
@@ -0,0 +1,11 @@ 
+#!/bin/bash
+
+set -e
+
+$NFT add table t
+$NFT add chain t c1
+$NFT add chain t c2
+$NFT add t c1 jump c2
+# kernel should return ENOENT
+$NFT add t c2 ip daddr vmap { 1 : jump c3 }
+echo "E: Jumped to non existing chain" >&2