Skip to contentSkip to conversation

tests: shell: Add test for flush bug on sets with size

PATCH Applied Elise Lennion 2 participants 2 messages Jan 23, 2017 – Jan 24, 2017 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests: shell: Add test for flush bug on sets with size

This tests for a bug where elements can't be added after flushing a full set with the flag NFTNL_SET_DESC_SIZE set.

---
 tests/shell/testcases/sets/0017add_after_flush_0 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100755 tests/shell/testcases/sets/0017add_after_flush_0
tests/shell/testcases/sets/0017add_after_flush_0 new file +12 -0
new file mode 100755
index 0000000..0390b03
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# This tests for a bug where elements can't be added after flushing a
+# full set with the flag NFTNL_SET_DESC_SIZE set
+
+set -e
+$NFT add table x
+$NFT add set x s {type ipv4_addr\; size 2\;}
+$NFT add element x s {1.1.1.1}
+$NFT add element x s {1.1.1.2}
+$NFT flush set x s
+$NFT add element x s {1.1.1.1}
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 2 lines · Elise Lennion

This tests for a bug where elements can't be added after flushing a full set with the flag NFTNL_SET_DESC_SIZE set.

Applied, thanks Elise.