Tcl Source Code

View Ticket
Login
Ticket UUID: 460591
Title: tcltest::singleProcess 1 ==> 8 tests fai
Type: Bug Version: obsolete: 8.4a4
Submitter: dgp Created on: 2001-09-11 06:19:27
Subsystem: None Assigned To: dgp
Priority: 3 Low Severity:
Status: Closed Last Modified: 2001-09-13 03:35:38
Resolution: Fixed Closed By: dgp
    Closed on: 2001-09-12 20:35:38
Description:
tcltest 2 defaults to evaluating each of the files
tests/*.test in its own child process.  This minimizes
the reach of failing tests that crash a process and
helps to isolate tests from one another.

When [tcltest::singleProcess 1] is evaluated, this
default is overridden, and all tests are evaluated
in a single process.  Some isolation is lost.  For
example, tests that assume that a command or a
variable is not defined may fail because that
command or variable has been defined by tests in
another file.  Particular culprits are [foo] or
$res.

Note that tcltest 2.0.1 has recently been changed
by Vince Darley to automatically detect when
the tests are not being run from a native file
system, and to set [tcltest::singleProcess 1] in
that case, so it's important that the Tcl test
suite work in this mode.

Note also that when backporting tests to the Tcl 8.3.x
branch, the Tcl 8.3.x release include tcltest 1, not
tcltest 2, so all tests are evaluated in a single
process.

The following tests fail when 'make test' is 
invoked in single process mode:

ioCmd-8.11
ioCmd-8.12
ioCmd-8.13
namespace-41.1
rename-4.1
rename-4.2
stack-2.1
tcltest-5.5
User Comments: dgp added on 2001-09-13 03:35:38:
Logged In: YES 
user_id=80530

Patch committed to HEAD and relevant portions to
8-3-1-branch.

dgp added on 2001-09-13 03:26:54:

File Added - 10714: iso.patch

Logged In: YES 
user_id=80530

Attached patch corrects all test isolation errors
exposed by:

make test TESTFLAGS="-singleProc 1"

dgp added on 2001-09-13 03:15:01:
Logged In: YES 
user_id=80530

I saw a failure in tcltest-5.5 only due to a
bug in tcltest.  That's now reported as Tcl bug
461000.

dgp added on 2001-09-13 02:46:45:
Logged In: YES 
user_id=80530


The ioCmd-8.* test failures did not depend on the
single process matter.  They're now reported separately
as 460993.

hobbs added on 2001-09-12 01:25:11:
Logged In: YES 
user_id=72656

These can be isolated, as done with stack-2.1:

***************
*** 46,55 ****
  } {too many nested calls to Tcl_EvalObj (infinite loop?)}
  
  test stack-2.1 {maxNestingDepth reached on infinite 
recursion} {minStack2400} {
!     catch {rename unknown unknown_safe}
!     interp alias {} unknown {} notaknownproc
!     catch {foo} msg
!     catch {rename unknown {} ; rename unknown_safe 
unknown}
      set msg
  } {too many nested calls to AliasObjCmd (infinite loop 
using alias?)}
  
--- 46,57 ----
  } {too many nested calls to Tcl_EvalObj (infinite loop?)}
  
  test stack-2.1 {maxNestingDepth reached on infinite 
recursion} {minStack2400} {
!     # do this in a slave to not mess with parent
!     set slave stack-2.1
!     interp create $slave
!     $slave eval { interp alias {} unknown {} 
notaknownproc }
!     set msg [$slave eval { catch {foo} msg ; set msg }]
!     interp delete $slave
      set msg
  } {too many nested calls to AliasObjCmd (infinite loop 
using alias?)}

Attachments: