This test case tests the id allocation of nftable set names. Signed-off-by: Varsha Rao <rvarsha016@xxxxxxxxx> --- Changes in v2: - Changed the number of sets from 40000 to 400. tests/shell/testcases/sets/0034add_many_sets_0 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 tests/shell/testcases/sets/0034add_many_sets_0 diff --git a/tests/shell/testcases/sets/0034add_many_sets_0 b/tests/shell/testcases/sets/0034add_many_sets_0 new file mode 100755 index 0000000..b65c915 --- /dev/null +++ b/tests/shell/testcases/sets/0034add_many_sets_0 @@ -0,0 +1,25 @@ +#!/bin/bash + +# This testscase checks addition of multiple sets. + +COUNT=400 + +tmpfile=$(mktemp) +if [ ! -w $tmpfile ] ; then + echo "Failed to create tmp file" >&2 + exit 0 +fi + +trap "rm -rf $tmpfile" EXIT # cleanup if aborted + +generate() { + for ((i=1; i<=COUNT; i++)) ; do + echo "add set x y${i} { type ipv4_addr; }" + done +} + +echo "add table x +$(generate)" > $tmpfile + +set -e +$NFT -f $tmpfile -- 2.14.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