|
2023-03-09
| ||
| 12:08 | • Ticket [ad28319dc2] winFCmd-6.1, -6.9, 6.13, -9.3 fail on Windows status sti... artifact: 455a8311bb user: fvogel | |
| 09:55 | • Ticket [ad28319dc2]: 5 changes artifact: 24306b374d user: apnadkarni | |
| 06:48 | • Ticket [ad28319dc2]: 5 changes artifact: 18bfc94780 user: fvogel | |
| 02:48 | • Ticket [ad28319dc2]: 5 changes artifact: 500631f69c user: apnadkarni | |
|
2023-03-08
| ||
| 21:47 | • Ticket [ad28319dc2]: 4 changes artifact: 7dc03aa3f2 user: fvogel | |
| 19:00 | • Ticket [ad28319dc2]: 5 changes artifact: dc9c872cd0 user: fvogel | |
| 09:51 | • Ticket [ad28319dc2]: 5 changes artifact: 9d1526477e user: apnadkarni | |
| 07:19 | • Ticket [ad28319dc2]: 6 changes artifact: 81ef836897 user: fvogel | |
|
2023-03-07
| ||
| 12:55 | • Closed ticket [ad28319dc2]. artifact: 43df9a1fe1 user: apnadkarni | |
| 10:18 | • Ticket [ad28319dc2]: 3 changes artifact: a386acd385 user: apnadkarni | |
|
2022-12-28
| ||
| 16:43 | • Ticket [ad28319dc2]: 3 changes artifact: 27eef10324 user: fvogel | |
|
2022-12-27
| ||
| 15:38 | • Ticket [ad28319dc2]: 3 changes artifact: 750595f39a user: fvogel | |
|
2020-12-26
| ||
| 20:43 | • Ticket [ad28319dc2]: 3 changes artifact: cca97e2fd1 user: fvogel | |
|
2019-09-09
| ||
| 21:11 | • Ticket [7de2d722bd] cmdAH-25.2 (Tcl_FileObjCmd: owned) fails on Windows stat... artifact: 62e29556b3 user: fvogel | |
|
2019-09-05
| ||
| 20:13 | • New ticket [ad28319dc2] winFCmd-6.1, -6.9, 6.13, -9.3 fail on Windows. artifact: e7b9c0b35f user: fvogel | |
winFCmd-6.1, -6.9, 6.13, -9.3 fail on Windows
==== winFCmd-6.1 TclpRemoveDirectory: errno: EACCES FAILED
==== Contents of test case:
file mkdir td1
testchmod 0 td1
testfile rmdir td1
file exists td1
---- Test completed normally; Return code was: 0
---- Return code should have been one of: 1
==== winFCmd-6.1 FAILED
==== winFCmd-6.9 TclpRemoveDirectory: errno == EACCES FAILED
==== Contents of test case:
file mkdir td1
testchmod 0 td1
testfile rmdir td1
file exists td1
---- Test completed normally; Return code was: 0
---- Return code should have been one of: 1
==== winFCmd-6.9 FAILED
==== winFCmd-6.13 TclpRemoveDirectory: write-protected FAILED
==== Contents of test case:
file mkdir td1
testchmod 0 td1
testfile rmdir td1
file exists td1
---- Test completed normally; Return code was: 0
---- Return code should have been one of: 1
==== winFCmd-6.13 FAILED
==== winFCmd-9.3 TraversalDelete: DOTREE_PRED FAILED
==== Contents of test case:
file mkdir td1/td2
testchmod 0 td1
testfile rmdir -force td1
file exists td1
---- Test completed normally; Return code was: 0
---- Return code should have been one of: 1
==== winFCmd-9.3 FAILED
62e29556b3Ticket [7de2d722bd] cmdAH-25.2 (Tcl_FileObjCmd: owned) fails on Windows status still Open with 3 other changes ticket2019-09-09 21:11:14
Report was for Vista, it is still happening for Win10.
Still reproducible. Win 10 version 22H2, core-8-6-branch built with MSVC 2022 version 17.1.6
[e5dbf11232] flagged these tests as 'knownMsvcBug' in core-8-6-branch (without any investigation) in 2019. This got immediately propagated to core-8-branch (8.7). Today, the constraint is still here in 8.7, therefore the failures are not seen in 8.7 because 'knownMsvcBug' causes theses tests to be skipped. There is also an additional 'notInCIenv' constraint on them.
In core-8-6-branch, the 'knownMsvcBug' constraint was changed in 2020 in [d6317640c1] to a 'notInCIenv' constraint, skipping the tests when they are running in the Github CI environment. I think this change was ill-advised because these tests also fail on my system (which obviously is outside of the CI environment).
I think the 'knownMsvcBug' should be put back in core-8-6-branch instead of the 'notInCIenv' constraint, and the 'notInCIenv' constraint be removed in core-8-branch. There is no reason the constraints should be different in 8.6 and 8.7.
And the cause for the failures need to be analyzed since they could reveal a real problem (the fact I'm running the tests as an admin user perhaps has something to do with the failures?)
Proposed fix in branch [bug-win-testchmod].
Thanks!! I confirm the failures are gone with core-8-6-branch built with MS Visual Studio on Win 11. The 'knownMsvcBug' constraints were correctly removed.
Strangely I'm now sseing a new failure:
==== winFCmd-1.24 TclpRenameFile: move a root dir FAILED
==== Contents of test case:
testfile mv / c:/
---- Result was:
ENOENT
---- Result should have been (exact matching):
EINVAL
==== winFCmd-1.24 FAILED
It does not look related to testchmod though, what do you think? Could this new failure reveal any side effect of the fix you made? It it not seen in the output logs at GitHub CI.
I just rechecked and don't see the winFCmd-1.24 test failure. testchmod is called from cleanup which is used in the setup for winFCmd-1.24 (though I don't see why it needs to be called there) but other than that I can't see how testchmod would affect it. Note that the fixes were not to Tcl itself but to the test harness. I wonder if it might have to do with Windows 11 returning a different error code from earlier Windows versions. Or had you tested the pre-testchmod commit on your system and not seen this failure? /Ashok
Yes you are right. winFCmd-1.24 already fails in core-8-6-branch with Win 11 just before the testchmod commit [10ec3cb22d], i.e. at [04077c7b2e]. It even fails with some random commit more than one year ago ([8396dc130d]).
Do you readily know how to fix this? Otherwise I'll open a new ticket for the records.
Quick analysis of the winFCmd-1.24 failure:
- [testfile mv / c:/] calls TclpObjRenameFile with (correct) "/" and "c:/" as string (obj) arguments
- TclpObjRenameFile on Windows is simply:
return DoRenameFile(Tcl_FSGetNativePath(srcPathPtr),
Tcl_FSGetNativePath(destPathPtr));
- The input arguments received by DoRenameFile are (correct or not?)
nativeSrc = \ nativeDst = c
- In DoRenameFile, the call to MoveFileW apparently does not succeed. GetLastError() spits 123 (ERROR_INVALID_NAME), and TclWinConvertError outputs 2 (ENOENT) with this error code.
- DoRenameFile exits at its very end with return TCL_ERROR;
Now, whether the error code triggered by MoveFileW was changed or not by Microsoft in Windows 11 is a good question. I don't have any Windows 10 box to check this, can you perhaps?
On Windows 10, the returned error code is 0x57 (ERROR_INVALID_VALUE). That would explain the test failing on Win 11. Have modified the test to account for both values. Please check on Win11
Well, your change in the expected test result of course makes the test pass on Windows 11 since either EINVAL or ENOENT is now accepted as a test result. Perhaps we should double check: 1. If it is correct for Tcl_FSGetNativePath to return "c" when it receives "c:/" ? Is it the same on Win 10 ? 2. What is the output result of TclWinConvertError when its argument is 0x57 (ERROR_INVALID_VALUE) ? Is it EINVAL ? 3. Could we find (in the MS documentation) any evidence of a change in the error code of MoveFileW between Windows 10 and Windows 11?
I am not sure exactly what your query is. I changed the test because I observed stepping through the debugger that MoveFileW sets GetLastError() as ERROR_INVALID_VALUE which is then mapped by errorTable[] to EINVAL in TclWinConvertError. I presumed on Win11 the returned value is the ERROR_INVALID_NAME Win32 error code mapped to ENOENT based on your previous report. Regarding Tcl_FSGetNativePath, it returns C:\ as expected. Remember the return is WCHARs so the bytes will be C \0 : \0 \\ \0. It will look like "C" if you are interpreting as chars. I haven't looked at MS docs but I certainly do not expect them to document changes of this nature. As it is they do not (understandably) document every possible error code that can be returned from a function. /Ashok
Thank you, you have perfectly answered my doubts! Many thanks!