Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #21799

Closed (moved)
(moved)
Open
Created Mar 22, 2017 by George Kadianakis@asn

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=37.218.246.143: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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking