This patch validates that creation of an already existing set bails out with EEXIST. Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- tests/shell/testcases/sets/0006create_set_0 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tests/shell/testcases/sets/0006create_set_0 diff --git a/tests/shell/testcases/sets/0006create_set_0 b/tests/shell/testcases/sets/0006create_set_0 new file mode 100755 index 0000000..ca36cf7 --- /dev/null +++ b/tests/shell/testcases/sets/0006create_set_0 @@ -0,0 +1,14 @@ +#!/bin/bash + +# This testscase checks for add and create set commands. + +set -e +$NFT add table t +$NFT add set t s { type ipv4_addr \; } +if $NFT create set t s { type ipv4_addr \; } 2>/dev/null ; then + echo "E: accepted set creation that already exists" >&2 + exit 1 +fi +$NFT add set t s { type ipv4_addr \; } + +exit 0 -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html