#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: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:

Merge pull request #948 from LeastAuthority?/3575.realistic_storage_index_hash-key

Test storage_index_hash with a realistic key

Fixes: ticket:3575

Note: See TracTickets for help on using tickets.