Artifacts Associated With Ticket 512214ffffffffff
Ticket change [3e4cd54539] (rid 121238) by kenstir on 2002-02-02 21:13:53:
- assignee initialized to: "melissachawla"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Some of the tcltest constraint initialization code is nontrivial. A caller may want to avoid running the initialization code. In my case, running the constraint initialization code hangs my application. This patch uses [info exists] to test a constraint first, and runs the code to set the constraint if it doesn't already exist. This patch is incomplete; it only handles the (stdio) constraint. If you agree with this style of test- first constraint setting, I can patch the other constraints and submit them. My example: I have a client app which opens an exclusive connection to a server. When this app tries to spawn itself (while setting the stdio constraint), it deadlocks waiting for the exclusive connection to the server. Whether this is good app design is outside the scope of this patch! Most of this patch is whitespace-only change.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "kenstir"
- subsystem initialized to: "34. tcltest Package"
- title initialized to: "allow skipping of constraint init code"
- type initialized to: "Patch"
Add attachment "patch" [f03eb51a63] (rid 109154) by kenstir on 2002-02-03 04:13:56.
Ticket change [85f28d7db5] (rid 131415) by kenstir on 2002-02-03 04:13:56:
- icomment:
File Added - 17181: patch
- login: "kenstir"
- mimetype: "text/plain"
- username: "kenstir"
- icomment:
Ticket change [91c4a81fc6] (rid 120672) by hobbs on 2002-03-23 08:00:48:
- assignee changed to: "dgp"
Ticket change [6d05810e0d] (rid 128628) by dgp on 2002-03-26 00:02:50:
- icomment:
Logged In: YES user_id=80530 I haven't examine this patch, but I agree with the sentiment. I think the tcltest package still suffers from its legacy as something that grew by accretion, and is something mostly used exclusively in a single appliction. The package/application boundary is not clean. It would be better for the package to make functionality available, and leave it to applications to actually exercise it. In the case, the tcltest package should provide a means for defining constraints, and it could even offer code that queries the system and sets up some standard constraints. But that code should only run in response to a command executed by an application. It should not be part of package initialization. Tricky bit will be making this transition while supporting compatibility -- perhaps some form of "auto-loading" of the currently built-in constraints. Not gonna get to this soon, but did want to comment.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- username: "dgp"
- icomment:
Ticket change [33c50cac33] (rid 106648) by dgp on 2002-06-01 06:35:50:
- priority changed to: "7 High"
Add attachment "lazytest.patch" [ac628d5eba] (rid 101281) by dgp on 2002-06-06 22:21:21.
Ticket change [dd18cc78f2] (rid 114594) by dgp on 2002-06-06 22:21:21:
- icomment:
Logged In: YES user_id=80530 Here's a patch that converts tcltest to do "lazy" initialization of test constraints. The value of a built-in constraint is not determined unless/until a [test] command that depends on that constraint is evaluated. This should address the problem. The patch also deprecates the [initConstraintsHook] because contraints are no longer initialized at package load time by default. For compatibility, if an [initConstraintsHook] has been defined, tcltest reverts to the old behavior of initialization of constraints at package load time. This should be discouraged. The hook is completely unnecessary; any tcltest user that wants to add a constraint can do so directly by calling the [testConstraint] command. No need for a hook at all. This patch also cleans up the mess that was the [limitConstraints] command. Some comments/documentation indicated this command took a boolean value; some that it took a list value. The existing code/tests did not appear to do anything sensible. I replaced the whole things with a consistent command that accepts a boolean value indicating whether or not to limit running of [test]s to those with constraints specified by the "-constraints" command line option. committing to tcltest 2.1 (Tcl 8.4a5)
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [17472f67f6] (rid 122460) by dgp on 2002-06-06 22:21:22:
- icomment:
File Added - 24513: lazytest.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [a16c21ef6f] (rid 109705) by dgp on 2002-06-06 22:22:05:
- closedate changed to: "2002-06-06T15:22:05"
- closer changed to: "dgp"
- resolution changed to: "Accepted"
- status changed to: "Closed"