#5079 DDE test failures

obsolete: 8.6b3
closed-fixed
5
2012-08-03
2012-07-18
Twylite
No

Hi,

Some DDE tests fail on WIN32 in a trunk build from 2012/07/18 using MSVC10, 32-bit tclsh running on Windows 7 64-bit.

Details:

Build setup (32-bit): 'Setting environment for using Microsoft Visual Studio 2010 x86 tools'
Testing platform: Windows 7 (64-bit), PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 30 Stepping 5, GenuineIntel

C:\User\Tcl_BUILD\cmake-2012\tcl-trunk>fossil pull
Server: http://core.tcl.tk/tcl

C:\User\Tcl_BUILD\cmake-2012\tcl-trunk>fossil update
updated-to: f0f8f508748b68a589768e9e7df3beea28279df9 2012-07-17 13:08:18 UTC
tags: trunk

Build commands:
set BUILDENV=VC10
set VER=86b3
set INSTALLDIR=%CD%\Release_%VER%_%BUILDENV%
set OPTS=threads
set TCLSH=%INSTALLDIR%\bin\tclsh86t.exe
mkdir %INSTALLDIR%
pushd win
nmake /f makefile.vc release tcltest OPTS=%OPTS% CFG_ENCODING=\\\"utf-8\\\" INSTALLDIR=%INSTALLDIR%
nmake /f makefile.vc install OPTS=%OPTS% CFG_ENCODING=\\\"utf-8\\\" INSTALLDIR=%INSTALLDIR%
nmake /f makefile.vc test

==== winDde-3.3 DDE request locally FAILED
==== Contents of test case:

set a ""
dde execute TclEval self [list set a foo]
dde request TclEval self a

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: remote server cannot handle this command
while executing
"dde request TclEval self a"
("uplevel" body line 4)
invoked from within
"uplevel 1 $script"
---- errorCode: TCL DDE NOCANDO
==== winDde-3.3 FAILED

==== winDde-3.5 DDE request locally FAILED
==== Contents of test case:

set a ""
dde execute TclEval self [list set a foo]
dde request -binary TclEval self a

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: remote server cannot handle this command
while executing
"dde request -binary TclEval self a"
("uplevel" body line 4)
invoked from within
"uplevel 1 $script"
---- errorCode: TCL DDE NOCANDO
==== winDde-3.5 FAILED

==== winDde-4.3 DDE request remotely FAILED
==== Contents of test case:

set a ""
set name ch\xEDld-4.3
set child [createChildProcess $name]
dde execute TclEval $name [list set a foo]
set a [dde request TclEval $name a]
dde execute TclEval $name {set done 1}
update
set a

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: remote server cannot handle this command
while executing
"dde request TclEval $name a"
("uplevel" body line 6)
invoked from within
"uplevel 1 $script"
---- errorCode: TCL DDE NOCANDO
==== winDde-4.3 FAILED

Discussion

  • Jan Nijtmans

    Jan Nijtmans - 2012-07-18
    • assigned_to: patthoyts --> nijtmans
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-18

    I cannot reproduce this with mingw. Will try with MSVC.

    $ make test TESTFLAGS="-file winDde.test"
    .....
    Only running test files that match: winDde.test
    Tests began at Wed Jul 18 15:04:33 CEST 2012
    winDde.test

    Tests ended at Wed Jul 18 15:05:07 CEST 2012
    all.tcl: Total 46 Passed 46 Skipped 0 Failed 0
    Sourced 1 Test Files.

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-26

    Now I can reproduce it. But only when using win/makefile.vc
    for building Tcl, with the configure-based win/Makefile.in
    build all is OK. Somehow, makefile.vc is not setting
    up the right environment for doing the dde tests:

    Patrick, did you notice this before?

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-26
    • assigned_to: nijtmans --> patthoyts
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-26
    • labels: 105669 --> 105687
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-26

    Patrick, In makefile.vc, I see the lines:

    test-core: setup $(TCLTEST) dlls $(CAT32)
    set TCL_LIBRARY=$(ROOT:\=/)/../library
    introduced in:
    http://core.tcl.tk/tcl/info/a983ca9a1f
    There's a "../" too much in there.
    (that still doesn't help this issue.....)

     
  • Twylite

    Twylite - 2012-07-27

    Confirmed that this is unique to 'nmake test'. If I install the build and run from the install path (with corrections for running outside the build tree - see 3549770) then these tests pass.

     
  • Twylite

    Twylite - 2012-07-30

    I can reproduce this bug by invoking tcltest.exe directly (i.e. not using 'nmake test') in both build and install environments, if and only if I include a '-loadfile' option to tests/all.tcl. Using -load with the appropriate 'package ifneeded' works fine. The moment I use -loadfile the three tests fail.

    I notice that makefile.vc uses -loadfile whereas Makefile.in uses -load, which would explain why the symptoms are specific to the nmake approach.

     
  • Twylite

    Twylite - 2012-07-30
    • labels: 105687 --> 104251
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-08-01

    Found the problem, so assigning back to me.

    Fix committed to trunk. The problem was in line 1506
    of tclWinDde.c, where a UTF-8 string was handled
    as UNICODE. As long as the string is followed by at
    least 3 null-bytes (the test only uses a one-character
    variable name), no-one would see the difference.

    Please, confirm that it's fixed now.

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-08-01
    • labels: 104251 --> 28. dde Package
    • assigned_to: patthoyts --> nijtmans
    • status: open --> pending-fixed
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-08-02

    Turns out that "dde poke" had the same bug, unfortunately we cannot write a test-case for that.

    Adapted more test-cases to use unicode variable names.

    Fixed now on trunk.

     
  • Twylite

    Twylite - 2012-08-03
    • status: pending-fixed --> closed-fixed
     
  • Twylite

    Twylite - 2012-08-03

    Okay, now that I've pulled from the right place and built the right thing, it all appears to work. Thanks :)

    Building [cc7f2bab] with bug-3545363 merged in; compiler MSVC10; OPTS=threads,symbols; 32-bit tclsh running on Windows 7 64-bit.

    nmake test:
    all.tcl: Total 47 Passed 47 Skipped 0 Failed 0

    tclsh86tg.exe ..\..\tcl\tests\all.tcl -file windde.test
    all.tcl: Total 47 Passed 47 Skipped 0 Failed 0

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks