Opened 6 months ago

Last modified 3 months ago

#29521 new defect

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

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: technical-debt, tor-dir
Cc: Actual Points:
Parent ID: Points: 5
Reviewer: Sponsor:

Description

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.

Child Tickets

Change History (3)

comment:1 Changed 6 months ago by teor

Sponsor: SponsorV-can

We could do this ticket for Sponsor V, but it won't fit in the time we have left.

comment:2 Changed 3 months ago by gaba

Removing sponsor V as we do not have more time to include this tickets in the sponsor.

comment:3 Changed 3 months ago by gaba

Sponsor: SponsorV-can

Removing sponsor from tickets that we do not have time to fit in the remain of this sponsorship.

Note: See TracTickets for help on using tickets.