flush, add 63 duplicate keys again (should work), then add entry 64 (should fail). This test fails before the rhashtable conversion, the old hash implementation did not reset h->bucketsize on flush, so post-flush next duplicate key immediately hits 'set full' error due to the refusal to expand the bucket further. Signed-off-by: Florian Westphal --- Fails on main, but not on rhashtable v8 patches. tests/hash:net,iface.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/hash:net,iface.t b/tests/hash:net,iface.t index c4a8de45fced..0386cc7b7921 100644 --- a/tests/hash:net,iface.t +++ b/tests/hash:net,iface.t @@ -134,8 +134,12 @@ 0 n=`ipset list test | grep -v Revision: | wc -l` && test $n -eq 71 # Flush test set 0 ipset flush test +# Add clashing elements after flush +0 (set -e; for x in `seq 0 63`; do ipset add test 10.0.0.0/16,eth$x; done) +# Check listing +0 n=`ipset list test | grep -v Revision: | wc -l` && test $n -eq 71 # Try to add more than 64 clashing entries -1 (set -e; for x in `seq 0 64`; do ipset add test 10.0.0.0/16,eth$x; done) +1 ipset add test 10.0.0.0/16,eth64 # Delete test set 0 ipset destroy test # Check all possible CIDR values -- 2.56.0