Skip to content
Tcl Source Code Artifact [43c02b49ed]
Login

Artifact [43c02b49ed]

Artifact 43c02b49ed5604721332634cb0d14462a20eeeb588272598cb619f77db2acb9f:

Ticket change [43c02b49ed] - New ticket [8c63606802922ce3|8c63606802] <i>filename-14.23.2 and filename-14.24 broken on Windows with -singleproc 1</i>. by apnadkarni on 2025-07-30 14:04:38.
D 2025-07-30T14:04:38.982
J assignee nobody
J closer nobody
J cmimetype text/x-markdown
J comment Running\sthe\stest\ssuite\son\sWindows\swith\s-singleproc\s1\sresults\sin\stwo\sfailures\sthat\sdo\snot\sshow\sup\sin\s-singleproc\s0\sruns.\sThis\sis\snot\sthe\susual\sfailure\sresulting\sfrom\sthe\sfailure\sof\scommand\sto\sclean\sup\safter\sthemselves\sbut\srather\swhat\sI\sconsider\sfundamentally\sbroken\sattempts\sto\stest\sUnix\sfilename\sparsing\son\sWindows\sand\svice\sversa\susing\s`testsetplatform`.\r\n\r\n(The\sREPRESENTATION\sline\sbelow\scomes\sfrom\sadded\sdebug\scode).\r\n\r\nThe\s-singleproc\s0\scase:\r\n\r\n```\r\n$\smake\s-s\stest\sTESTFLAGS="-f\sfileName.test\s-singleproc\s0\s-verbose\se"\r\n...\r\nfileName.test\r\nREPRESENTATION:value\sis\sa\spure\sstring\swith\sa\srefcount\sof\s1,\sobject\spointer\sat\s0x8ac980,\sstring\srepresentation\s"/"\r\n\r\nTests\sended\sat\sWed\sJul\s30\s18:59:37\s+0530\s2025\r\nall.tcl:\s\s\s\s\s\s\s\sTotal\s\s\s300\s\s\s\s\sPassed\s\s276\s\s\s\s\sSkipped\s24\s\s\s\s\s\sFailed\s\s0\r\n```\r\n\r\nThe\s-singleproc\s1\srun\sreports\stwo\sfailures:\r\n\r\n```\r\n$\smake\s-s\stest\sTESTFLAGS="-f\sfileName.test\s-singleproc\s1\s-verbose\se"\r\n...\r\nfileName.test\r\nREPRESENTATION:value\sis\sa\spath\swith\sa\srefcount\sof\s14,\sobject\spointer\sat\s0x1379570,\sinternal\srepresentation\s0x3da18d0:0x0,\sstring\srepresentation\s"/"\r\n\r\n====\sfilename-14.23.2\sslash\sglobbing\sFAILED\r\n----\sResult\swas:\r\nC:/\r\n----\sResult\sshould\shave\sbeen\s(exact\smatching):\r\n/\r\n====\sfilename-14.23.2\sFAILED\r\n\r\n====\sfilename-14.24\sslash\sglobbing\sFAILED\r\n----\sResult\swas:\r\nC:/\r\n----\sResult\sshould\shave\sbeen\s(exact\smatching):\r\n/\r\n====\sfilename-14.24\sFAILED\r\n\r\nTests\sended\sat\sWed\sJul\s30\s18:59:49\s+0530\s2025\r\nall.tcl:\s\s\s\s\s\s\s\sTotal\s\s\s300\s\s\s\s\sPassed\s\s274\s\s\s\s\sSkipped\s24\s\s\s\s\s\sFailed\s\s2\r\n```\r\n\r\n**Tcl\sis\sactually\sreturning\sthe\scorrect\sresult.**\sThe\sexpected\sresult\sthat\sis\sconstructed\sas\s`-result\s[file\snormalize\s/]`\sis\salso\s*theoretically*\scorrect.\sThe\sreason\sfor\sfailure\sis\ssubtle\sbut\sthe\sREPRESENTATION\slines\sabove\sprovide\sthe\shint.\r\n\r\nThe\sfileName.test\ssuite\sattempts\sto\stest\sfile\sname\sparsing\sfor\splatforms\s*other\sthan\sthe\shost\splatform*.\sSo\son\sWindows\sfor\sexample,\sit\salso\stries\sto\stest\sfor\scorrect\sparsing\sas\sper\sUnix\sconventions.\sIt\sdoes\sthis\sthrough\sthe\suse\sof\sthe\srather\sdubious\s(imo)\stcltest\scommand\s`testsetplatform`\swhich\smodifies\sthe\sinternal\sglobal\s`tclPlatform`\sinto\sthinking\sit\sis\sUnix.\s\r\nThe\stests\sthen\salternate\sbetween\stesting\sUnix\sconventions\sand\sWindows\sconventions\sby\seach\stest\scalling\s`testsetplatform\sunix`\sor\s`testsetplatform\swindows`.\r\n\r\nThe\sproblem\sis\sthat\sthe\sTcl\spath\smanipulation\scode\s**caches\sthe\snormalized\sform\sof\sa\spath**.\s\sAt\ssome\spoint\sin\sthe\s`-singleproc\s1`\scase,\sthe\sliteral\s`/`\shas\sits\sinternal\srepresentation\schanged\sto\stype\s`path`\swhich\sholds\sthe\snormalized\spath\sas\sper\sUnix.\sWhen\sthe\sWindows\sversion\sof\sthe\stest\sruns,\sit\scalls\s`testsetplatform\swindows`\sbut\s`file\snormalize\s/`\snever\slooks\sat\s`tclPlatform`\sbecause\sit\ssees\sthe\s`/`\sliteral\shaving\sa\scached\snormalized\sform\sand\sreturns\sit,\snot\srealizing\sthat\scached\sform\swas\sconstructed\sas\sper\sUnix\sconventions.\sThe\s`-singleproc\s0`\scase\sdoes\snot\ssee\sthis\sfailure\sbecause\sas\sshown\sby\sthe\sREPRESENTATION\slines,\sthe\s`/`\sliteral\sis\snot\scached.\r\n\r\nThe\stest\scases\scan\sbe\sfixed\sby\sensuring\s`/`\sdoes\snot\shave\san\sinternal\srep,\se.g.\s`file\snormalize\s[string\sindex\sx/\s1]`\sor\ssimilar.\r\n\r\nThe\sbigger\sissue\sto\sme\sis\sthat\sattempting\sto\semulate\sanother\splatform\sfile\sname\sparsing\son\sa\sdifferent\splatform\sis\swrong\sheaded\sunless\sit\sis\sspecifically\sa\sfeature\sof\sthe\slanguage\s(which\sit\sis\snot)\sand\sthe\slanguage\simplementation\sis\swritten\sto\shandle\sit\scorrectly\s(which\sit\sis\snot\seither).\sAs\sfileName.test\sitself\swarns,\sany\sattempts\sat\scd,\sor\sother\sfile\ssystem\soperations\swhen\stestsetplatform\sis\sin\suse\swill\sresult\sin\sundefined\sbehaviour\sand\scrashes.\sFurthermore,\sthe\scaching\sfeature\sof\sthe\spath\s`Tcl_Obj`\sinternal\srepresentation\smakes\sthis\srather\sfragile.\r\n\r\nSo,\sI\swould\slike\sto\sexpunge\sthe\suses\sof\s`testsetplatform`\sfrom\s`fileName.test`.\sSince\sthe\sTcl\simplementation\sis\snot\swritten\sfor\sthis\scross-platform\sswitching,\sthe\stest\ssuite\sshould\snot\stry\sto\sfool\sit\seither.\sTest\sUnix\son\sUnix,\sWIndows\son\sWindows.\r\n\r\nThoughts\sfrom\sanyone\swho's\sread\sto\sthe\send\s:-)\s?
J foundin 9.0
J is_private 0
J login apnadkarni
J priority 5\sMedium
J private_contact 9546e9877f1a8899e25a89082561ee694e7fb402
J resolution None
J severity Important
J status Open
J submitter apnadkarni
J subsystem -\sNew\sBuiltin\sCommands
J title filename-14.23.2\sand\sfilename-14.24\sbroken\son\sWindows\swith\s-singleproc\s1
J type Bug
K 8c63606802922ce324debc0ce6659e2792affcc0
U apnadkarni
Z e6489c30b1d081249da67f32c902caeb