Opened 5 months ago

Closed 5 months ago

Last modified 4 months ago

#28562 closed defect (fixed)

test: doesn't use a temporary a DataDirectory

Reported by: dgoulet Owned by:
Priority: Medium Milestone: Tor: 0.4.0.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-test
Cc: Actual Points:
Parent ID: Points:
Reviewer: dgoulet Sponsor:


Riastradh on IRC reported this with

Tor logged: "Nov 21 20:08:11.296 [warn] Error creating directory /home/riastradh/.tor:

That test is not using a temporary dir (example: mktemp -d) so tor is using the default one which is ~/.tor.

Really not good, out tests should not poke $HOME whatsoever unless we change it. Solution would be to create a temp dir, spawn Tor pointing it to that path and then remove it.

Child Tickets

Attachments (1)

test_rebind.patch (2.4 KB) - added by riastradh 5 months ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 5 months ago by teor

Let's make sure that all our tests are using a temporary data directory

Changed 5 months ago by riastradh

Attachment: test_rebind.patch added


comment:2 Changed 5 months ago by riastradh

This is the only test that failed when I ran make check with a nonwritable $HOME. With the attached patch, the tests pass.

comment:3 Changed 5 months ago by teor

Status: newneeds_review

Thanks, someone should review this patch in the next week or so.

comment:4 Changed 5 months ago by dgoulet

Milestone: Tor: 0.3.5.x-finalTor: 0.4.0.x-final
Status: needs_reviewmerge_ready

I've put the patch in branch ticket28562_040_01

Works good for me, lgtm; Lets feed Travis before any merge.

comment:5 Changed 5 months ago by dgoulet

Reviewer: dgoulet

comment:6 Changed 5 months ago by nickm

travis passes; merging.

comment:7 Changed 5 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

comment:8 Changed 4 months ago by nickm

Cherry-picked this back to 0.3.5, and added a changes file.

Note: See TracTickets for help on using tickets.