[MacPorts] #44749: reclaim test suite fails if not run with superuser privileges
#44749: reclaim test suite fails if not run with superuser privileges ----------------------+------------------------ Reporter: larryv@… | Owner: ksammons@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.99 Keywords: | Port: ----------------------+------------------------ Running the `macports1.0` test suite without superuser privileges fails because the [[browser:trunk/base/src/macports1.0/tests/reclaim.test#L41|remove_distfiles]] test tries to write to the distfiles directory used by the current MacPorts installation. {{{ % make -C ~/Projects/MacPorts/git-svn/trunk/base/src/macports1.0 test /opt/local/libexec/macports/bin/tclsh8.5 ./tests/test.tcl -nocolor Warning: test Total:41 Passed:34 Failed:00 Skipped:07 macports.test Constraint: 7 root Total:14 Passed:14 Failed:00 Skipped:00 macports_dlist.test Total:08 Passed:08 Failed:00 Skipped:00 macports_util.test Total:04 Passed:01 Failed:01 Skipped:02 reclaim.test Constraint: 2 root ==== remove_distfiles # Regression test for remove_distfiles. # # Constraints: # None. Test for distfiles being successfully removed. FAILED ==== Contents of test case: set path [file join ${macports::portdbpath} distfiles] set file [file join $path "test.txt"] set fd [open $file w] close $fd reclaim::remove_distfiles if {[file exists $file]} { return "FAIL: Did not remove distfile." } return "Successfully removed distfile." ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: couldn't open "/opt/local/var/macports/distfiles/test.txt": permission denied while executing "open $file w" ("uplevel" body line 6) invoked from within "uplevel 1 $script" ---- errorCode: POSIX EACCES {permission denied} ==== remove_distfiles FAILED make: *** [test] Error 1 % }}} The test should not be doing this; it should create a dummy `portdbpath` and use it, like [[browser:trunk/base/src/macports1.0/tests/macports.test#L19|macports.test]] does. -- Ticket URL: <https://trac.macports.org/ticket/44749> MacPorts <http://www.macports.org/> Ports system for OS X
#44749: reclaim test suite fails if not run with superuser privileges -----------------------+---------------------------- Reporter: larryv@… | Owner: ksammons@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.99 Resolution: | Keywords: gsoc14-cleanup Port: | -----------------------+---------------------------- Changes (by larryv@…): * keywords: => gsoc14-cleanup -- Ticket URL: <https://trac.macports.org/ticket/44749#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts