#5024 fCmd test assumes too much about the contents of /tmp

obsolete: 8.5.11

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):
==== 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!


  • Serg G. Brester

    Serg G. Brester - 2012-04-19

    Commited blind in bug-3519357.
    Please test, cause I have currently no unix development ready at hand...

  • Don Porter

    Don Porter - 2012-04-19
    • labels: --> 37. File System
    • assigned_to: nobody --> dgp
  • Don Porter

    Don Porter - 2012-04-19

    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.

  • Don Porter

    Don Porter - 2012-05-24

    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.

  • Don Porter

    Don Porter - 2012-06-01

    Updated revisions posted to bug-3519357

  • Don Porter

    Don Porter - 2012-06-01

    merged to release branches.

  • Don Porter

    Don Porter - 2012-06-01
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks