Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • 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
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #26014
Closed (moved) (moved)
Open
Issue created May 03, 2018 by Nick Mathewson@nickm🤹

Fix two cases of nondeterminism in voting_schedule.c coverage

After another set of coverage-comparison testing, I found the following to cases of nondeterminism in the tests for voting_schedule.c:

--- a/voting_schedule.c.gcov
+++ b/voting_schedule.c.gcov
@@ -61,7 +61,7 @@
         -:
         1:  next += offset;
         1:  if (next - interval > now)
-    #####:    next -= interval;
+        1:    next -= interval;
         -:
         1:  return next;
         -:}
--- a/voting_schedule.c.gcov
+++ b/voting_schedule.c.gcov
@@ -52,7 +52,7 @@
         -:
         -:  /* Intervals never cross midnight. */
         1:  if (next > midnight_tomorrow)
-    #####:    next = midnight_tomorrow;
+        1:    next = midnight_tomorrow;
         -:
         -:  /* If the interval would only last half as long as it's supposed to, then
         -:   * skip over to the next day. */

I think that these changes are probably dependent on using clock time for our tests, since they all happened around 0:00 UTC.

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