Artifacts Associated With Ticket 558742ffffffffff
Ticket change [f4850fdf58] (rid 129936) by vincentdarley on 2002-05-21 15:56:48:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The tcltest package tries to create a file 'tmp' in the pwd. This is particularly problematic when 'pwd' is inside a vfs (which can easily happen since tcltest is actually a part of default tclkit executables). Furthermore, under some circumstances, even if the 'tmp' file is created, it is not cleaned up. The problematic code is around line 1179 of tcltest.tcl: testConstraint stdio 0 catch { catch {file delete -force tmp} set f [open tmp w] puts $f { exit } close $f set f [open "|[list [interpreter] tmp]" r] close $f testConstraint stdio 1 } catch {file delete -force tmp} Problems observed are: (i) assumption that 'tmp' is in the native filesystem and therefore that 'open |' will work. (ii) assumption that 'puts $f ...' will not fail -- if it does, then '$f' is never closed. It would be best if 'tmp' was put in $env(TEMP), ... - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "vincentdarley"
- subsystem initialized to: "34. tcltest Package"
- title initialized to: "tcltest creates 'tmp' in current dir"
- type initialized to: "Bug"
Ticket change [a4598b463f] (rid 110193) by dgp on 2002-05-22 11:45:36:
- assignee changed to: "dgp"
Ticket change [58e7b23d91] (rid 117879) by dgp on 2002-06-01 05:44:46:
- icomment:
Logged In: YES user_id=80530 A number of things are at play here. The assumption (i) noted above is actually what is being tested. The "stdio" constraint is supposed to indicate that the [interpreter] can be launched as a pipeline, according to the docs. ASIDE: very strange name if you ask me, this was not at all obvious to me, and I re-invented this constraint in the main.test as "exec" (sort of). Still, there really is no need to write a script file to test pipeline launching. One could as easily send the [exit] command through the pipeline to stdin. Even if a temp file is needed, tcltest already has [makeFile] and [removeFile] for that purpose, and should use them. They write files to [temporaryDirectory] which is tcltest's version of $env(TEMP). A request that the default value of [temporaryDirectory] should be $env(TEMP) should be a separate report. It's not clear to me why the final catch {file delete -force tmp} is not removing the tmp, though. Something subtle in a VFS? - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [7a0ee9b52d] (rid 90243) by dgp on 2002-06-01 05:50:03:
- icomment:
Logged In: YES user_id=80530 Forgot to mention that the whole shebang is in [InitConstraints], which is itself a design mistake. As noted in Patch 512214, tcltest currently forces all of its built-in constraints to be initialized whether or not the tester is going to use them. Would be much better to have the user request initialization of constraints by name, or at least have them lazily initialized when needed. I believe this large amount of unnecessary initialization is a big reason the tcltest.test of Tcl's test suite is sooooooo sloooooowwwww...
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [f201fd3422] (rid 109457) by dgp on 2002-06-06 22:22:47:
- closedate changed to: "2002-06-06T15:22:47"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Patch 512214 fixes this. committed.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"