Opened 6 years ago

Closed 6 years ago

#10928 closed defect (fixed)

Stat information is not obtained properly in test test_config_check_or_create_data_subdir

Reported by: _x3j11 Owned by:
Priority: Medium Milestone: Tor: 0.2.5.x-final
Component: Core Tor/Tor Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


The test test_config_check_or_create_data_subdir makes a stat call that is asserted to fail, but then a successful stat call is not made at all. This means that the stat information st is not initialized, and can potentially contain garbage which would mean the permission information used by chmod would be invalid and the chmod call would fail.

The attached patch simply executes stat again (as well as changes test_fail_msg to tt_abort_perror, so information why a step has failed can be better communicated).

Child Tickets

Attachments (1)

0001-Restitute-a-successful-stat-call-to-this-test-case.patch (1.3 KB) - added by _x3j11 6 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 6 years ago by _x3j11

Status: newneeds_review

comment:2 Changed 6 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looks good to me. I added a changes file with 3899cde2cb8f02237fcb37c2c90ae01868ade200 and merged.

Note: See TracTickets for help on using tickets.