Enabled erase=noop in test_rbyd, changed read* to error on leb128 overflow

Now that reproducibility issues with erase_value=-1 (erase=noop) are
fixed, this much more useful to test than erase_value=0x1b. Especially
since erase=noop is filled with so many sharp corners.

These tests already found that we were being too confident with our
leb128/lleb128/tag parsing. Since we need to partially parse unfinished/
old commits, lfsr_dir_read* can easily encounter invalid leb128s during
normal operation. If this happens we should not assert.

Doing things correctly has a bit of a cost:

           code          stack
  before: 33928           2824
  after:  33976 (+0.1%)   2824 (+0.0%)

At least we haven't seen any issues with our valid bit invalidating
logic yet.
This commit is contained in:
Christopher Haster
2024-05-01 15:23:10 -05:00
parent 5fbf073bfb
commit ab2a1cb571
2 changed files with 14 additions and 6 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
after = 'test_bd'
# test with a number of different erase values
defines.ERASE_VALUE = [0xff, 0x00, 0x1b]
defines.ERASE_VALUE = [0xff, 0x00, -1]
# set block_size to the full size of disk so we can test arbitrarily
# large rbyd trees, we don't really care about block sizes at this