Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-10-28
13:43 • Closed ticket [572400ffff]: constraint exprs defeat limitConstraints plus 5 ... artifact: c62fffa3e3 user: jan.nijtmans
2026-10-22
11:44
Many tcltest improvements, [773924ffff], [811659ffff], [572400ffff], [8413e79232] and [1528500fff] check-in: e44f1d0e87 user: jan.nijtmans tags: core-9-0-branch
08:35 • Pending ticket [572400ffff]: constraint exprs defeat limitConstraints plus 4... artifact: 25c06a6a74 user: jan.nijtmans
08:25
Many tcltest improvements, [773924ffff], [9f4feaaaa1], [811659ffff], [572400ffff], [8413e79232] and ... check-in: 891b7e7921 user: jan.nijtmans tags: trunk, main
2026-10-20
18:30 • Ticket [572400ffff] constraint exprs defeat limitConstraints status still Op... artifact: 8ed9bc39cc user: dgp
18:20 • Ticket [572400ffff]: 6 changes artifact: 0e9159b0a0 user: dgp
14:26 • Ticket [572400ffff]: 4 changes artifact: 110cc03791 user: serhiy.storchaka
14:22
Fix [572400ffff]: with -limitconstraints, a constraint expression is satisfied only if it is true an... closed check-in: 241d536f30 user: serhiy.storchaka tags: tcltest-limitconstraints-expr
2002-06-22
04:05 • New ticket [572400ffff] constraint exprs defeat limitConstraints. artifact: 080bef8fa7 user: dgp

constraint exprs defeat limitConstraints

Closed / Fixed572400ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 35 days ago
Descriptionplain2002-06-22 04:05:02
The [test] command honors constraint "expressions" so that,
for example, one could constrain a test with "!unix" to run
only on platforms that are not unix.  (Don't do that!  Use
notUnix instead).

However, the [limitConstraints] feature is implemented so
that it only works if all constraints are simple lists of
constraint keywords.  (It may be even worse -- it could
be that only simple constraints can be managed by
the [limitConstraints] feature).

For example, testing Tcl with the options
    -constraints knownBug -limitConstraints 1
to try to test only known bugs, the test
tcltest-5.5 is still run because its constraint is
    !singleProc
Referenced by3
serhiy.storchakawiki2026-10-20 14:26:05

Still the case on main, 9.0 and 8.6: -limitconstraints forces the unselected constraints to 0, so expressions like !foo or $::tcl_version > 0 become true. With -constraints knownBug -limitconstraints 1 the whole test suite runs 76 tests.

Proposed fix in branch [tcltest-limitconstraints-expr] (stacked on the other tcltest fixes): in that mode an expression constraint must also name one of the selected constraints. The knownBug run then has 29 tests. New test tcltest-5.2b.

dgpplain2026-10-20 18:20:29
Thanks for the work on this.  I'm putting it on my list of
fixes to examine.

Just a comment that for me a desired long-range fix for
these issues would be to eliminate support for constraint
expressions.  They've always been short of working well,
reliably and robustly, and the gain from trying to offer
it is just not compelling.

At least the ideal tcltest, version 3 in my head does not have it.
dgpplain2026-10-20 18:30:18
One consequence of constraint expression support
is you cannot have an expression with a name
anything like

  this-should-only-run-in-this-situation

because tcltest insists on thinking that is
a constraint subtraction.  Just not good.
jan.nijtmansplain2026-10-22 08:35:38
Fixed in [891b7e7921|trunk], not backported yet to 9.0 and 8.6

I don't think I would want constraints with minus-signs in it. What I see now is using camelCase, like thisShouldOnlyRunInThisSituation
jan.nijtmanswiki2026-10-28 13:43:31

Now also backported to core-9-0-branch and core-8-6-branch

Closing. Many thanks!

Log in (anonymous is fine) to add a comment.