Opened 8 months ago

Closed 8 months ago

#23741 closed defect (fixed)

scripts/test/coverage tries to mv .gcov files to /

Reported by: catalyst Owned by: catalyst
Priority: Medium Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version: Tor: 0.2.5.1-alpha
Severity: Normal Keywords: tor-tests-coverage
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When run with no arguments, the scripts/test/coverage script attempts to move the .gcov files to the root directory. This shouldn't happen. Hopefully most users won't run this script as a UID that has write access to the root directory, but we should fix this anyway. Either exit with a usage error if there is no directory name argument, or change the test to [ -d "$dst" ]. (The existing test, [ -n $dst ] with no quoting around $dst, returns true if $dst is empty on the macOS and Linux systems I've tried it on. This surprising behavior is apparently required by POSIX.)

Child Tickets

Change History (2)

comment:1 Changed 8 months ago by catalyst

Status: assignedneeds_review
Version: Tor: 0.2.5.1-alpha

comment:2 Changed 8 months ago by nickm

Resolution: fixed
Status: needs_reviewclosed

lgtm; merged!

Note: See TracTickets for help on using tickets.