Opened 5 years ago

Closed 5 years ago

#14107 closed defect (fixed)

Integrate stem tests into the suite of tests tor launches.

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay testing
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I've been running the stem tests on and off for ages, but I'm not sure who else besides me and Damian actually knows how. Let's add a make target to tor to launch them.

Child Tickets

Change History (5)

comment:1 Changed 5 years ago by atagar

Hi Nick, this would be great! Filed #14109 to add the use cases of the module Gisle mentioned.

comment:2 Changed 5 years ago by nickm

First attempt in "ticket14107" in my public repository. Please review?

comment:3 Changed 5 years ago by nickm

Status: newneeds_review

comment:4 Changed 5 years ago by atagar

Looks great! One thing you might want to consider is that Stem has multiple integ targets. By default it runs with an open control port but there's other options too...

% ./run_tests.py --help

...

  Integration targets:
    ONLINE       - Includes tests that require network activity.
    RELATIVE     - Uses a relative path for tor's data directory.
    CHROOT       - Simulates a chroot setup.
    RUN_NONE     - Configuration without a way for controllers to connect.
    RUN_OPEN     - Configuration with an open control port (default).
    RUN_PASSWORD - Configuration with password authentication.
    RUN_COOKIE   - Configuration with an authentication cookie.
    RUN_MULTIPLE - Configuration with both password and cookie authentication.
    RUN_SOCKET   - Configuration with a control socket.
    RUN_SCOOKIE  - Configuration with a control socket and authentication cookie.
    RUN_PTRACE   - Configuration with an open control port and 'DisableDebuggerAttachment 0'
    RUN_ALL      - Runs integration tests for all connection configurations.

If you don't mind having a long runtime the RUN_ALL target will give you the best coverage by including all auth types, both ControlPort/ControlSocket, and DisableDebuggerAttachment.

Maybe when Stem is unavailable make should give the setup instructions?

To run these tests you need Stem and a STEM_SOURCE_DIR environment variable
telling us where to find it...

  % git clone https://git.torproject.org/stem.git
  % export STEM_SOURCE_DIR=`pwd`/stem
  % make test-stem

comment:5 Changed 5 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Applied and merged; thanks!

Note: See TracTickets for help on using tickets.