[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3575: There is no realistic direct `storage_index_hash` "known answer"-style unit test

Tahoe-LAFS trac at tahoe-lafs.org
Tue Dec 29 14:42:47 UTC 2020


#3575: There is no realistic direct `storage_index_hash` "known answer"-style unit
test
---------------------+---------------------------
 Reporter:  exarkun  |          Owner:
     Type:  defect   |         Status:  new
 Priority:  normal   |      Milestone:  undecided
Component:  unknown  |        Version:  n/a
 Keywords:           |  Launchpad Bug:
---------------------+---------------------------
 `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.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3575>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list