Opened 6 years ago

Closed 4 years ago

#8250 closed enhancement (implemented)

Check tor for new capabilities

Reported by: atagar Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Keywords: testing, easy
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The integration tests should check our tor instance to see if it has capabilities that stem doesn't (for instance, new GETINFO options or events). If this check fails then it should give a message like "if you're running the latest version of stem then please file a ticket on trac.torproject.org". The server_descriptor and extrainfo_descriptor integ tests both have testing output that could make use of this.

Child Tickets

Change History (7)

comment:1 Changed 6 years ago by ouzel

Here are my changes -
https://github.com/ouzel/stem/commit/376a7855c6e479c42b5b1e1c8010725208406280

I have changed the error messages where we run into unrecognized lines. I made these changes in the microdescriptor and networkstatus integ tests too. Let me know if I am missing something :)

Thanks!

comment:2 Changed 6 years ago by atagar

Hi ouzel. Thanks for the try, but this misses the goal of the ticket. The aim is to do two things...

  1. Rather than calling fail(), register the new capabilities then give a message at the end of the test run.
  2. Look for new GETINFO options, events, etc.

That is to say, if we come across new capabilities during our test run then remember them and at the end display a message like...

Your version of tor has capabilities stem presently isn't taking
advantage of. If you're running the latest version of stem then
please file a ticket on...

https://trac.torproject.org/projects/tor/wiki/doc/stem/bugs

New capabilities are...

* Tor event type: CIRC_DIAGNOSIS
* Extrainfo Descriptor Entry: client-sig c8931c09d6

comment:3 Changed 4 years ago by atagar

Keywords: testing easytesting, easy

comment:4 Changed 4 years ago by clv

Hi atagar,

Is this approach correct? Commit link

Given that "run single tests" is now available, I was able to test this on descriptor.server_descriptor. I'm still getting used to stem coding guidelines, so I would like you to check if I'm doing things in the right way.

From what I understood from this ticket (and from Tor specs) the idea is to provide a forward-compability when new capabilities are found and report to the user the new capabilities rather than just fail.

Let me know if this is OK, so I can continue to add this to the other tests.

comment:5 Changed 4 years ago by atagar

Hi clv, thanks for biting this off! I really like your approach - yup, looks good to me!

comment:6 Changed 4 years ago by clv

Hi atagar,

I've made more changes

Do you think it is necessary to add this to other files? I did looked for other files but I couldn't find other place where to add this.

comment:7 Changed 4 years ago by atagar

Resolution: implemented
Status: newclosed

Thanks clv! Merged with support for new event types too. Amusingly it already caught a minor bug. :P

Note: See TracTickets for help on using tickets.