[tor-bugs] #29585 [Core Tor/Tor]: Intermittent test failures in dir/dirserv_read_measured_bandwidths

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Feb 27 10:55:56 UTC 2019


#29585: Intermittent test failures in dir/dirserv_read_measured_bandwidths
------------------------------------------+--------------------------------
 Reporter:  teor                          |          Owner:  (none)
     Type:  defect                        |         Status:  new
 Priority:  High                          |      Milestone:  Tor:
                                          |  unspecified
Component:  Core Tor/Tor                  |        Version:  Tor:
                                          |  unspecified
 Severity:  Normal                        |     Resolution:
 Keywords:  tor-ci, tor-test, tor-bwauth  |  Actual Points:
Parent ID:                                |         Points:  1
 Reviewer:                                |        Sponsor:
------------------------------------------+--------------------------------

Comment (by juga):

 Replying to [comment:5 teor]:
 > Unstable tests can fail, even if there are no changes to any code run by
 that test.

 what is an unstable test?

 > Is there an obvious error in dirserv_read_measured_bandwidths that
 caused the failure?

 No, but let me try to explain what i see in case helps you to come out
 with an explanation.

 The test [0] that is failing is testing a bandwidth file with only the
 timestamp and a new line.
 `dirserv_read_measured_bandwidths` should parse the timestamp correctly
 and assign `bw_file_headers` returning 0.

 It could return -1 instead of 0 in case:
 - Can't open the bandwidth file
 - The bandwidth file is empty
 - The timestamp line doesn't end with new line
 - The timestamp can't be parsed as integer
 - The timestamp is old
 All of this is initialized in the test, and in theory, correctly. And if
 it's not, should then fail all the times.
 I can only think on `write_str_to_file` not writing the file because of
 some temporal problem in the filesystem. Could be that in your case?.
 Or i didn't realize else.
 [0]
 https://github.com/nmathewson/tor/blob/bug29541/src/test/test_dir.c#L1802

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29585#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list