Thread overview
DStress Windows improvements
Dec 06, 2005
Stewart Gordon
Dec 10, 2005
Thomas Kuehne
Dec 10, 2005
Walter Bright
Dec 14, 2005
James Dunne
Dec 15, 2005
Stewart Gordon
Dec 16, 2005
Thomas Kuehne
December 06, 2005
I've improved the DStress test-runner to work better on Windows.

It now uses CreateProcess with some SetStdHandle magic to redirect the output.  This means that it will work on Win9x, which is more than can be said of the 1> 2> stuff.  Also, it seems that different platforms/compilers have different functions called system, which serve the same purpose but differ in the return value semantics.  On mine (DMC on Win98SE) for example, it's always returning 1.

This has also made it possible to implement timeout checking.  Oh, and I've added a few more strings to hadExecCrash.

For that matter, how is whoever it is batch-running the testcases under Windows, if at all?  There doesn't seem to be a Windows-compatible makefile.

Of course, since Win9x doesn't have a built-in means of redirecting stderr, you'd need to use Rederr or a similar tool to generate the log files.

The attached code is based on the version from the backup SVN repository, which seems to predate Torture.  (The live repository isn't accessible through my connection at the moment.  I hadn't got as far as checking if the current DStress engine code is accessible via the web....)

Stewart.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:- C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.


December 10, 2005
Stewart Gordon schrieb am 2005-12-06:
> I've improved the DStress test-runner to work better on Windows.
>
> It now uses CreateProcess with some SetStdHandle magic to redirect the output.  This means that it will work on Win9x, which is more than can be said of the 1> 2> stuff.  Also, it seems that different platforms/compilers have different functions called system, which serve the same purpose but differ in the return value semantics.  On mine (DMC on Win98SE) for example, it's always returning 1.
>
> This has also made it possible to implement timeout checking.  Oh, and I've added a few more strings to hadExecCrash.

Thanks, updated.

> For that matter, how is whoever it is batch-running the testcases under Windows, if at all?  There doesn't seem to be a Windows-compatible makefile.
>
> Of course, since Win9x doesn't have a built-in means of redirecting stderr, you'd need to use Rederr or a similar tool to generate the log files.

For most of test cases the makefile generates simple shell
commands in the form:
.\dstress torture-run run/offset_63.d 2>> long-log >> short-log

The Windows specific problem are the pop-ups from test cases like .\dstress run run/many_functions_01.d

The handling of those pop-ups seems to require a "mouse"-bot ...

> The attached code is based on the version from the backup SVN repository, which seems to predate Torture.  (The live repository isn't accessible through my connection at the moment.  I hadn't got as far as checking if the current DStress engine code is accessible via the web....)

I'll updated the public backup as soon as I have access to a reliable
network connection.
(not related to the dstress.kuehne.cn server: different networks/hardware)

http://dstress.kuehne.cn/dstress.c http://dstress.kuehne.cn/crashRun.c

Thomas


December 10, 2005
"Stewart Gordon" <smjg_1998@yahoo.com> wrote in message news:dn3r9u$kfo$1@digitaldaemon.com...
> I've improved the DStress test-runner to work better on Windows.

Why not translate it to D? <g>


December 14, 2005
Walter Bright wrote:
> "Stewart Gordon" <smjg_1998@yahoo.com> wrote in message
> news:dn3r9u$kfo$1@digitaldaemon.com...
> 
>>I've improved the DStress test-runner to work better on Windows.
> 
> 
> Why not translate it to D? <g>
> 
> 
Good question
December 15, 2005
James Dunne wrote:
> Walter Bright wrote:
<snip>
>> Why not translate it to D? <g>
>>
> Good question

I believe the original reason for writing it in C is that there are C compilers out there that are reliable enough that a bug introduced in the next version isn't going to stop it from working.

But hmm....

Stewart.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:- C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
December 16, 2005
Stewart Gordon schrieb am 2005-12-15:
> James Dunne wrote:
>> Walter Bright wrote:
><snip>
>>> Why not translate it to D? <g>
>>>
>> Good question
>
> I believe the original reason for writing it in C is that there are C compilers out there that are reliable enough that a bug introduced in the next version isn't going to stop it from working.
>
> But hmm....

In addition there is the porting issue - e.g. DMD can't create native code on the testing machine (AMD64 and 64bit OS).

dstress.c is currently called ca. 4000 times and crashRun.c ca. 208000 times during a complete test of one DMD version. A potential bug in the emulation libs or DMD's code generation would trash the test results and could require serious work to atleast locate the cause.

Thomas