Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 831
    • Issues 831
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 31
    • Merge requests 31
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #26014

Closed
Open
Created May 03, 2018 by Nick Mathewson@nickm👉Owner

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