test_shutil.TestWhich.test_non_matching_mode fails when run as root

Bug #1169458 reported by Jean-Baptiste Lallement
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python
Fix Released
Unknown
python3.3 (Ubuntu)
New
Undecided
Unassigned

Bug Description

python3.3 is run under autopkgtest as root which makes the testcase test_shutil.TestWhich.test_non_matching_mode fails because the temporary file is always writeable:

To reproduce the failure run the command:

$ sudo python3.3 -E -Wd -tt /usr/lib/python3.3/test/regrtest.py -v -w test_shutil
[...]
======================================================================
FAIL: test_non_matching_mode (test.test_shutil.TestWhich)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.3/test/test_shutil.py", line 1334, in test_non_matching_mode
    self.assertIsNone(rv)
AssertionError: '/tmp/Tmpn3pl68/Tmp3w_zif.Exe' is not None

----------------------------------------------------------------------

Possible solutions:
  - Change which invocation to search for a file with 'execute' bit set
  - Set immutable attribute on the temporary file
  - Skip the test when executed as root

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: python3.3 3.3.1-1ubuntu2
ProcVersionSignature: Ubuntu 3.8.0-17.27-generic 3.8.6
Uname: Linux 3.8.0-17-generic x86_64
ApportVersion: 2.9.2-0ubuntu8
Architecture: amd64
Date: Tue Apr 16 09:52:15 2013
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: python3.3
UpgradeStatus: Upgraded to raring on 2012-01-31 (440 days ago)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Changed in python:
status: Unknown → New
Changed in python:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.