SourceForge has been redesigned. Learn more.
Close

#5084 fcmd test failures on Windows

obsolete: 8.5.12
open-fixed
5
2012-07-24
2012-07-23
Twylite
No

Hi,

I've just done a pull/update to core-8-5-12-rc and built a 32-bit Tcl using MSVC10 on Windows 7 64-bit. Running the test suite brings up the following failing tests:

===== fCmd.test
Test file error: can't read "tmpspace": no such variable
while executing
"file join $tmpspace tf1"
invoked from within
"test fCmd-6.19 {CopyRenameOneFile: errno == EXDEV} {xdev notRoot} {
cleanup $tmpspace
createfile tf1
file rename tf1 $tmpspace
glob -n..."
(file "C:/User/Tcl_BUILD/cmake-2012/tcl/tests/fCmd.test" line 557)

==== filesystem-1.3 link normalisation FAILED
==== filesystem-1.4 link normalisation FAILED

Twylite: (both covered by #3545366 and #3075027)

==== winFCmd-2.8.1 TclpCopyFile: errno: EACCES FAILED
==== Contents of test case:

cleanup
list [catch {testfile cp nul tf1} msg] $msg

---- Result was:
1 EINVAL
---- Result should have been (exact matching):
1 EACCES
==== winFCmd-2.8.1 FAILED

Twylite: 2.8.1 is meant for winOlderThan2000. I'm running on Windows 7. Platform detection logic appears to be incorrect.

==== winFCmd-6.1 TclpRemoveDirectory: errno: EACCES FAILED
==== Contents of test case:

cleanup
file mkdir td1
testchmod 000 td1
catch {
testfile rmdir td1
file exists td1
} r
catch {
testchmod 777 td1
cleanup
}
set r

---- Result was:
td1 EACCES
---- Result should have been (exact matching):
0
==== winFCmd-6.1 FAILED

Twylite: the testchmod 000 appears to make rmdir fail (EACCES). The subsequent testchmod 777 allows td1 to be removed. Not sure why the test is expecting 0.

==== winFCmd-6.9 TclpRemoveDirectory: errno == EACCES FAILED
==== Contents of test case:

cleanup
file mkdir td1
testchmod 000 td1
catch {
testfile rmdir td1
file exists td1
} r
catch {
testchmod 777 td1
cleanup
}
set r

---- Result was:
td1 EACCES
---- Result should have been (exact matching):
0
==== winFCmd-6.9 FAILED

Twylite: as for winFCmd-6.1.

==== winFCmd-6.13 TclpRemoveDirectory: write-protected FAILED
==== Contents of test case:

cleanup
file mkdir td1
testchmod 000 td1
catch {
testfile rmdir td1
file exists td1
} r
catch {
testchmod 777 td1
cleanup
}
set r

---- Result was:
td1 EACCES
---- Result should have been (exact matching):
0
==== winFCmd-6.13 FAILED

Twylite: as for winFCmd-6.1.

==== winFCmd-7.15 TraverseWinTree: append \ to target if necessary FAILED
==== Contents of test case:

cleanup
file mkdir td1
list [catch {testfile cpdir td1 /} msg] $msg

---- Result was:
1 {/ EEXIST}
---- Result should have been (exact matching):
1 {/ EACCES}
==== winFCmd-7.15 FAILED

Twylite: looks like Windows 7 produces a different error code.

==== winFCmd-9.3 TraversalDelete: DOTREE_PRED FAILED
==== Contents of test case:

cleanup
file mkdir td1/td2
testchmod 000 td1
catch {
testfile rmdir -force td1
file exists td1
} r
catch {
testchmod 777 td1
cleanup
}
set r

---- Result was:
td1 EACCES
---- Result should have been (exact matching):
0
==== winFCmd-9.3 FAILED

Twylite: as for winFCmd-6.1.

Discussion

  • Jan Nijtmans

    Jan Nijtmans - 2012-07-23
    • status: open --> pending
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-23

    > Twylite: 2.8.1 is meant for winOlderThan2000. I'm running on Windows 7.
    > Platform detection logic appears to be incorrect.
    Indeed the platform detection logic was way too strict.
    Fixed now in core-8-5-branch.

    On my Windows 7, all fCmd.test testcases now pass:

    Tests began at Mon Jul 23 16:22:35 CEST 2012
    winFCmd.test
    Tests ended at Mon Jul 23 16:22:35 CEST 2012
    all.tcl: Total 182 Passed 158 Skipped 24 Failed 0
    Sourced 1 Test Files.
    Number of tests skipped for each constraint:
    9 95
    9 cdrom
    3 emptyTest
    2 exdev
    1 nonPortable

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-23
    • assigned_to: vincentdarley --> nijtmans
    • status: pending --> pending-fixed
     
  • Twylite

    Twylite - 2012-07-24

    Confirmed that the fix addresses the 'tmpspace' bug and winFCmd-2.8.1.

    I'm still getting the same failures on winFCmd-6.1, winFCmd-6.9, winFCmd-6.13, and winFCmd-9.3.

    Further investigation shows that the tests pass if the user has Full Control (F) permission over [pwd], and fail otherwise (giving EACCES, but cleaning up correctly). Note that users may often have only Change (C) permission rather than Full Control for a particular folder.

    This may be a curiosity of NTFS, or it could be that [file rmdir] needs to attempt to change the permissions first (I don't know what the intended behaviour is).

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-24

    > I'm still getting the same failures on winFCmd-6.1, winFCmd-6.9,
    > winFCmd-6.13, and winFCmd-9.3.
    Those are exactly the 4 tests that are marked with
    contraint winVista on trunk, in the following commit.

    Patrick, can you shine a light on this? Should
    your fix be backported?
    ===============================================================
    2009-11-10 Pat Thoyts <patthoyts@users.sourceforge.net>
    * tests/winFCmd.test: Cleanup directories that have been set chmod 000. On Windows7 and Vista we really have no access and these were getting left behind.
    A few tests were changed to reflect the intent of the test where
    setting a directory chmod 000 modification. This restriction was ignored on XP but is honoured
    on Vista

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-24
    • assigned_to: nijtmans --> patthoyts
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-24
    • status: pending-fixed --> open-fixed