Tk Source Code

View Ticket
Login
Ticket UUID: e70612ee4885d4429c0665d4cda9821d5ae075e5
Title: Inappropriate definition of constraint "userInteraction" in constraints.tcl
Type: Bug Version: 9.1 (trunk)
Submitter: erikleunissen Created on: 2025-11-19 10:30:01
Subsystem: 99. Other Assigned To: nobody
Priority: 5 Medium Severity: Important
Status: Closed Last Modified: 2026-01-13 20:48:06
Resolution: Fixed Closed By: erikleunissen
    Closed on: 2026-01-13 20:48:06
Description:
The test constraint "userInteraction" is defined as "false" by the test
framework in package tcltest.

This code block in the file constraints.tcl redefines it:

    [https://core.tcl-lang.org/tk/file?ci=df7d241d4372112b&name=tests%2Fconstraints.tcl&ln=156-160]

There are two issues with this code block:

1. the definition in line 156 is executed after tcltest evaluates any options
   that may change the value of that test constraint. Thus, it definitely disables
   running the tests carrying that constraint (e.g. by invoking the test suite
   with the option “-constraints userInteraction”).
2. the successive definition of constraint “nonUnixInteraction” in lines 157-160
   uses the construct [testConstraint userInteraction], as if its outcome varies.
   The fact that the test constraint has been hard-coded to "0" in the preceding
   line is in contradiction with the presumed variable behaviour.

Both issues can be resolved by simply removing the definition in line 156.

The code block was originally introduced in commits [3892bfbf58] and
[d5cee69da5] (dgp, 2002).
The definition of "nonUnixInteraction" was later modified in commit [63bc9be0bb]
(das, 2007).

@dgp and @das: could you please comment/advise about removing the definition in
line 156, considering the original intention of the code block?
User Comments: erikleunissen added on 2026-01-13 20:48:06:
The proposed fix is now included in trunk and core-9-0-branch through the merge of branch "remaining_test_suite_issues".

Closing the ticket.

erikleunissen added on 2025-12-03 18:31:11:
Proposed resolution committed on branch "remaining_test_suite_issues".
See commit [99ba692ef6].