| Ticket UUID: | 3519357 | ||
| Title: | fCmd test assumes too much about the contents of /tmp | ||
| Type: | Bug | Created on: | 2012-04-19 02:32:03 |
| Submitter: | Assigned to: | dgp | |
| Subsystem: | 37. File System | Severity: | |
| Priority: | 5 Medium | Last modified: | 2012-06-02 02:34:39 |
| Status: | Closed | Closed by: | dgp |
| Resolution: | Fixed | Closed on: | 2012-06-01 19:34:39 |
| Version: | obsolete: 8.5.11 | ||
| Description: | ||||
I encountered the following test failure:
==== fCmd-6.21 CopyRenameOneFile: copy/rename: S_ISDIR(source) FAILED
==== Contents of test case:
cleanup /tmp
file mkdir td1
file rename td1 /tmp
glob -nocomplain td* /tmp/td*
---- Result was:
/tmp/tdfile.tmp /tmp/td1
---- Result should have been (exact matching):
/tmp/td1
==== fCmd-6.21 FAILED
/tmp/tdfile.tmp is owned by a different user, and happens to not be writable by the user running the test.
This means that "cleanup /tmp" failed to delete /tmp/tdfile.tmp , which resulted in the error.
If the tests need to use /tmp, it would be great if they could create a uniquely-named directory inside of it (using a random number, or some mechanism similar to mkstemp(3) ) and do all their file manipulations in there.
$ uname -a:
Linux box_rhel6 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Thank you!
| ||||
| User Comments: | ||||
sebres added on 2012-04-19 15:12:07:
Commited blind in bug-3519357. Please test, cause I have currently no unix development ready at hand... dgp added on 2012-04-19 20:25:54:
Thanks for reporting. These are very old tests. We'll need to examine what the reason is for fiddling with /tmp. It could be that we can update them to use testing facilities like [temporaryDirectory] that came later than the tests themselves did. If there's some actual testing need for using /tmp then something like the submitted patch is a good idea. dgp added on 2012-05-25 01:36:55:
These tests are essentially unchanged since Tcl 7.6. The apparent intent of them is to test Tcl's responses when attempting to rename a file from one mounted native filesystem to another. The assumption is that /tmp and . are on different mounts. dgp added on 2012-06-02 02:11:25:
Updated revisions posted to bug-3519357 dgp added on 2012-06-02 02:34:39:
allow_comments - 1 merged to release branches. | ||||
