Opened 10 days ago

Last modified 38 minutes ago

#29702 needs_review defect

Stop using configs from the local tor install when we launch tor for tests

Reported by: teor Owned by: rl1987
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: technical-debt, tor-test
Cc: rl1987 Actual Points:
Parent ID: Points: 1
Reviewer: mikeperry Sponsor:

Description

We should stop using paths in /usr when we're launching tor for build tests.

We don't get full logs for all the tor processes we launch, but these scripts launch tor, so they're probably affected:

  • test_rebind.sh
  • test_key_expiration.sh
  • test_keygen.sh
  • test_zero_length_keys.sh

test-network.sh is also affected, but we'll deal with that in chutney in #29701.

For example, on my machine, test_rebind.sh does:

2019-03-05 11:00:11.573 Tor logged: "Mar 05 11:00:11.571 [notice] Configuration file "/usr/local/etc/tor/torrc" not present, using reasonable defaults.", waiting for "Opened Control listener on"
2019-03-05 11:00:11.596 Tor logged: "Mar 05 11:00:11.591 [notice] Parsing GEOIP IPv4 file /usr/local/share/tor/geoip.", waiting for "Opened Socks listener"
2019-03-05 11:00:11.899 Tor logged: "Mar 05 11:00:11.899 [notice] Parsing GEOIP IPv6 file /usr/local/share/tor/geoip6.", waiting for "Opened Socks listener"

Child Tickets

Change History (7)

comment:1 Changed 8 days ago by rl1987

Cc: rl1987 added

comment:2 Changed 5 days ago by rl1987

Owner: set to rl1987
Status: newaccepted

comment:3 Changed 5 days ago by rl1987

test_keygen.sh does the following:

 85 touch "${DATA_DIR}/empty_torrc"                                                 
 86                                                                                 
 87 QUIETLY="--hush"                                                                
 88 SILENTLY="--quiet"                                                              
 89 TOR="${TOR_BINARY} ${QUIETLY} --DisableNetwork 1 --ShutdownWaitLength 0 --ORPort 12345 --ExitRelay 0 -f ${DATA_DIR}/empty_torrc"

comment:4 Changed 5 days ago by rl1987

So does test_key_expiration.sh; test_zero_length_keys.sh launches zero_length_keys.sh, which does this as well.

comment:5 Changed 5 days ago by rl1987

Status: acceptedneeds_review

Doing the same in test_rebind.py: https://github.com/torproject/tor/pull/793

comment:6 Changed 5 days ago by nickm

Milestone: Tor: unspecifiedTor: 0.4.1.x-final

comment:7 Changed 38 minutes ago by asn

Reviewer: mikeperry
Note: See TracTickets for help on using tickets.