Bug 7037 - Tests should not use hard-coded /tmp paths
Summary: Tests should not use hard-coded /tmp paths
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: All All
: high normal
Assignee: Portland Integration Project
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 7011
  Show dependency treegraph
 
Reported: 2006-05-26 05:12 UTC by Daniel Macks
Modified: 2006-07-14 10:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.