s3/torture: local_rbtree: avoid birthday collisions
commit267f307689b92bc7e1e407fb7f1a9f556d7d8b90
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 22 May 2024 00:15:37 +0000 (22 12:15 +1200)
committerVolker Lendecke <vl@samba.org>
Fri, 31 May 2024 04:22:36 +0000 (31 04:22 +0000)
treee6d55b3df92a232f08d2f3ecd3052acdadb6a71a
parent3a7dbf8b77b2a9e7cdc55bc5b339b9f501d037aa
s3/torture: local_rbtree: avoid birthday collisions

We insert 999 keys, but if two of them happen to be the same, we
don't find 1000 nodes, and that is upsetting for CI:

[130(1421)/303 at 4m46s] samba3.smbtorture_s3.LOCAL-RBTREE
UNEXPECTED(failure): samba3.smbtorture_s3.LOCAL-RBTREE.smbtorture(none)
REASON: Exception: Exception: using seed 1716333987
host=foo share=bar user= myname=runner-jlguopmm-project-6378020-concurrent-0
Running LOCAL-RBTREE
run_local_rbtree: read1: 999 999, NT_STATUS_OK
run_local_rbtree: delete: 999 999, NT_STATUS_OK
run_local_rbtree: read2: 0 0, NT_STATUS_OK
TEST LOCAL-RBTREE FAILED!
LOCAL-RBTREE took 0.002706 secs

This has been flapping very occasionally for a long time:
https://lists.samba.org/archive/samba-technical/2016-March/112861.html

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/torture/torture.c