Opened at 2020-12-29T14:42:47Z
Closed at 2021-01-04T20:01:57Z
#3575 closed defect (fixed)
There is no realistic direct `storage_index_hash` "known answer"-style unit test
Reported by: | exarkun | Owned by: | GitHub <noreply@…> |
---|---|---|---|
Priority: | normal | Milestone: | undecided |
Component: | unknown | Version: | n/a |
Keywords: | Cc: | ||
Launchpad Bug: |
Description
allmydata.test.test_hashutil.HashUtilTest.test_known_answers attempts to provide certain hash-related regression detection by comparing the outputs of various hash functions for certain known inputs.
Since these hash functions are meant to be deterministic and stable over time, the value computed today should be the same as the value computed tomorrow.
The known input for the storage_index_hash test in this method uses a key of b"". However, all keys under real usage of this function must be 16 bytes long. It would be better if there were a direct test of this function for known input which could possibly be a real key instead of one which cannot possible be a real key.
Change History (2)
comment:1 Changed at 2020-12-29T15:49:28Z by exarkun
comment:2 Changed at 2021-01-04T20:01:57Z by GitHub <noreply@…>
- Owner set to GitHub <noreply@…>
- Resolution set to fixed
- Status changed from new to closed
In 08bb067/trunk:
https://github.com/tahoe-lafs/tahoe-lafs/pull/948