#23758 closed defect (fixed)

test config/include_no_permission fails when run as root

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

Description (last modified by catalyst)

I managed to get the gitlab.com CI running using the .gitlab-ci.yml on master. (There are other issues with that CI configuration; see #23755 and #23756.) It fails with

config/include_no_permission: 
  FAIL src/test/test_config.c:4975: assert(config_get_lines_include(torrc_contents, &result, 0,&include_used) OP_EQ -1): 0 vs -1
  [include_no_permission FAILED]

As far as I can tell, this can only happen if opendir() can succeed on a mode 0100 directory. Maybe this strange thing can happen in the Docker environment that runs gitlab.com CI jobs? I don't know enough about Docker to say how plausible that explanation is.

Edit: This seems to be because the gitlab.com CI runs as root.

Child Tickets

Change History (8)

comment:1 Changed 21 months ago by catalyst

To get that amount of detail, I needed to patch .gitlab-ci.yml to also run cat test-suite.log like .travis.yml already does. (See also #23757.)

comment:2 Changed 21 months ago by catalyst

Apparently the Docker image used by the gitlab.com shared CI runners is privileged, so the whole job runs as root. That would explain why opendir() succeeded on an unreadable directory. Maybe that test should get skipped if it's running as root.

comment:3 Changed 21 months ago by catalyst

Owner: set to catalyst
Status: newaccepted

comment:4 Changed 21 months ago by catalyst

Description: modified (diff)
Summary: test config/include_no_permission fails on gitlab.com CI because Docker?test config/include_no_permission fails when run as root

comment:5 Changed 21 months ago by catalyst

Status: acceptedneeds_review

comment:6 Changed 21 months ago by catalyst

Version: Tor: 0.3.2.2-alpha

comment:7 Changed 21 months ago by nickm

hrm. Is there really nothing we can do to the directory that makes opendir() not open it? If not, then we may as well take this approach.

comment:8 Changed 21 months ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merged to master!

Note: See TracTickets for help on using tickets.