Tcl Source Code

View Ticket
Login
Ticket UUID: 9d79d6b2f270c68ba755c0a6e911d10263746cf8
Title: winFCmd tests use the wrong drive.
Type: Bug Created on: 2026-08-18 02:36:20
Submitter: apnadkarni Assigned to: nobody
Subsystem: - New Builtin Commands Severity: Minor
Priority: 5 Medium Last modified: 2026-08-18 17:58:24
Status: Open Closed by: nobody
Resolution: None Closed on:
Version:
Description:

Some Windows tests assume that the second drive is D: on systems with two drives and fail when that is not the case.

See this and this in core mailing list.

User Comments:
apnadkarni added on 2026-08-18 03:39:02:
The missing D: drive test failure is because the suite assume that the second drive on a two drive system is D:. That assumption has been around since 2008 or so. It has not failed before because no normalization test (until 9.1) actually tested the scenario of normalization of volume-relative paths on a different drive. Should be fixed by modifying the tests to not assume second drive is D:.

The failure Phil sees *after* adding a D: drive is related to invoking the test suite from Powershell (as opposed to cmd). (Phil, please confirm running from cmd.exe does not exhibit the failure). The current directory tracking per drive depends on hidden environment variables set by cmd (but not by powershell). Not sure how to resolve this, or whether there is a solution. Will need further investigation.

apnadkarni added on 2026-08-18 03:46:42:

Actually the underlying issue is seen by starting powershell from cmd (tcl not involved in any way). Below, the d: relative drive in cmd is D:\src\twapi\win but powershell does not see that because it uses a different internal tracking mechanism.

c:\src\tcltk\main\tcl\win>
c:\src\tcltk\main\tcl\win>d:

D:\src\twapi\win>c:

c:\src\tcltk\main\tcl\win>powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\src\tcltk\main\tcl\win> d:
PS D:\>

pbrooks added on 2026-08-18 17:58:24:
Yes, the second form of failure seems limited to when the test is invoked from PowerShell.  Starting a cmd shell passes when a USB drive is added as the D: drive.