diff options
-rwxr-xr-x | tests/shell/testcases/chains/0014rename_0 | 19 | ||||
-rwxr-xr-x | tests/shell/testcases/chains/0014rename_1 | 14 |
2 files changed, 19 insertions, 14 deletions
diff --git a/tests/shell/testcases/chains/0014rename_0 b/tests/shell/testcases/chains/0014rename_0 new file mode 100755 index 00000000..bebe48d6 --- /dev/null +++ b/tests/shell/testcases/chains/0014rename_0 @@ -0,0 +1,19 @@ +#!/bin/sh + +$NFT add table t || exit 1 +$NFT add chain t c1 || exit 1 +$NFT add chain t c2 || exit 1 +# kernel should return EEXIST +$NFT rename chain t c1 c2 + +if [ $? -eq 0 ] ; then + echo "E: Renamed with existing chain" >&2 + exit 1 +fi + +# same, should return EEXIST +$NFT 'rename chain t c1 c3;rename chain t c2 c3' +if [ $? -eq 0 ] ; then + echo "E: Renamed two chains to same name" >&2 + exit 1 +fi diff --git a/tests/shell/testcases/chains/0014rename_1 b/tests/shell/testcases/chains/0014rename_1 deleted file mode 100755 index e29e7889..00000000 --- a/tests/shell/testcases/chains/0014rename_1 +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -e - -$NFT add table t -$NFT add chain t c1 -$NFT add chain t c2 -# kernel should return EEXIST -$NFT rename chain t c1 c2 - -if [ $? -eq 0 ] ; then - echo "E: Renamed with existing chain" >&2 - exit 0 -fi |