Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2012-06-02
02:34 • Closed ticket [3519357fff]: fCmd test assumes too much about the contents of /tm... artifact: c5337da8ee user: dgp
02:11 • Ticket [3519357fff]: 4 changes artifact: 9b5dd7ffc6 user: dgp
2012-05-25
01:36 • Ticket [3519357fff]: 4 changes artifact: 8b899663f8 user: dgp
2012-04-19
20:25 • Ticket [3519357fff]: 6 changes artifact: 13ff5855b0 user: dgp
15:12 • Ticket [3519357fff]: 4 changes artifact: 285a331a55 user: sebres
02:32 • New ticket [3519357fff]. artifact: b6747c1221 user: anonymous

fCmd test assumes too much about the contents of /tmp

Closed / Fixed3519357fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2012-04-19 02:32:03
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!
sebresplain2012-04-19 15:12:07
Commited blind in bug-3519357.
Please test, cause I have currently no unix development ready at hand...
dgpplain2012-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.
dgpplain2012-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.
dgpplain2012-06-02 02:11:25
Updated revisions posted to bug-3519357
dgpplain2012-06-02 02:34:39
allow_comments - 1

merged to release branches.
Log in (anonymous is fine) to add a comment.