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
  • #29521

Closed (moved)
(moved)
Open
Created Feb 18, 2019 by teor@teor

Update test descriptors, and work out how to keep them updated

Tor's unit tests contain a bunch of test descriptors: router descriptors, extrainfo descriptors, votes, and onion service descriptors.

But these descriptors go out of date over time, because we don't keep them updated.

For example, EX_EI_MAXIMAL in src/test/example_extrainfo.inc is no longer maximal, because we added PaddingStatistics (and maybe other statistics).

Ideally, we need:

  1. tests for the oldest supported minimal and maximal descriptors
  2. tests for significant changes in the minimal and maximal descriptors
  3. tests for the current version's minimal and maximal descriptors
  4. a test that fails if we forget to update the test descriptors for a new feature

We could implement 1 & 2 by storing minimal and maximal descriptors from each supported Tor version. We could test 3 by generating and parsing the descriptors as part of the test, and 4 by checking for new fields in the generated descriptor, that are missing from the latest stored descriptor.

Maybe we also want a test that old versions can parse newer descriptors?

We could store an archive of supported descriptors, and test it against every supported Tor version using CI and a (Travis) cron job.

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