Unittest fail: FAIL ../tor/src/test/test_entrynodes.c:618: assert(smartlist_len(gs_br->sampled_entry_guards) OP_EQ 2): 1 vs 2
entrynodes/parse_from_state_full: [forking] FAIL ../tor/src/test/test_entrynodes.c:618: assert(smartlist_len(gs_br->sampled_entry_guards) OP_EQ 2): 1 vs 2 [parse_from_state_full FAILED]
The entry nodes unittests are failing because of an expired timestmap. Specifically:
"Guard in=bridges rsa_id=5800000000000000000000000000000000000000 " "bridge_addr=220.127.116.11:28366 " "sampled_on=2016-11-18T15:07:34 sampled_by=0.3.0.0-alpha-dev listed=1\n";
since it was sampled over 120 days ago we get:
Mar 22 11:44:29.227 [info] sampled_guards_update_from_consensus(): Removing sampled guard $5800000000000000000000000000000000000000 ($5800000000000000000000000000000000000000): it was sampled over 120 days ago, but never confirmed.
The fix is to use
get_yesterday_date_str() instead of a hardcoded date. It's not trivial tho because in the end the test tries to be smart and predict how the state is gonna be modified, so we need to also work on the
tt_str_op(joined, OP_EQ, ...) part.
Also, there seem to be more unittests with hardcoded 2016 dates. We should see if those are ticking bombs as well.