tests.test_utils.TestSCUtils.test_safe_makedirs andtest_ensure_file_writable_and_delete_if_not fail to run if run as root
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-center (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
autopkgtest runs adt-run as root.
The following tests fails when run as root because root as permission to do what would be denied to a normal user:
=======
FAIL: test_ensure_
-------
Traceback (most recent call last):
File "tests/
self.
AssertionError: True is not false
=======
FAIL: test_safe_makedirs (tests.
-------
Traceback (most recent call last):
File "tests/
self.
AssertionError: OSError not raised
-------
They should be skipped if run as root or change to another user. In the latter case, care must be taken that this test user as proper access to the source during the run (otherwise the run will hang)
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: software-center 5.3.9
ProcVersionSign
Uname: Linux 3.5.0-11-generic x86_64
ApportVersion: 2.5.1-0ubuntu2
Architecture: amd64
Date: Mon Aug 27 12:45:25 2012
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: software-center
UpgradeStatus: Upgraded to quantal on 2012-01-31 (208 days ago)
Same issue with test_logging