Commit Graph

6 Commits

Author SHA1 Message Date
Dan Christensen 6aa53a5627 hashindex_pytest.py: add test_hashindex_compact_stress 2023-02-11 19:13:20 -05:00
Dan Christensen 133ffebc8d hashindex_pytest.py: factor out verify_hash_table 2023-02-11 17:37:20 -05:00
Thomas Waldmann 3d57dc0590
hashindex: add tests, misc. minor fixes/changes
test hashtable expansion/rebuild.

hashindex_lookup:
- return -2 for a compact / completely full hashtable
- return -1 and (via start_idx pointer) the deleted/tombstone bucket index.

fix size assertion (we add 1 element to trigger rebuild)

fix upper_limit check - since we'll be adding 1 to num_entries below,
the condition should be >=:

hashindex_compact: set min_empty/upper_limit

Co-authored-by: Dan Christensen <jdc+github@uwo.ca>
2023-02-09 22:14:07 +01:00
Thomas Waldmann 1ed8ac0408
hashindex_pytest: move hashtable create into separate function 2023-02-09 21:58:40 +01:00
Thomas Waldmann e556233e30
hashindex_pytest: add a comment 2023-02-09 21:58:37 +01:00
Thomas Waldmann 4c2af9fb96
renamed hashindex_stress -> hashindex_pytest 2023-02-09 21:58:23 +01:00
Renamed from src/borg/testsuite/hashindex_stress.py (Browse further)