Bug 7037

Summary: Tests should not use hard-coded /tmp paths
Product: Portland Reporter: Daniel Macks <dmacks>
Component: xdg-utilsAssignee: Portland Integration Project <portland>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 7011    

Description Daniel Macks 2006-05-26 05:12:20 UTC
xdg-utils/tests/t.xdg-copy and t.xdg-desktop use files with hard-coded names in
/tmp. That's not very polite...means users can interfere with each others'
tests. At an extreme, it looks like a dangerous race condition...what happens if
one is running the tests as root on a slow system, and someone else manages to
symlink the $dest to /etc/passwd? Better to use 'tempfile -d' to create a
private arena for the tests, or else to use to use the local tests/ directory
(or a subdirectory).
Comment 1 Bryce Harrington 2006-06-09 20:29:14 UTC
I've switched these tests to using tempdir.
Comment 2 Tom Whipple 2006-07-14 10:53:45 UTC
Note that tempfile is not part of all distros by default (eg. SUSE 10.0). New
tests will use a local subdir.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.