www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DStress Windows improvements

reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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.
Dec 06 2005
next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 -----BEGIN PGP SIGNATURE----- iD8DBQFDmpHw3w+/yD4P9tIRAmdCAJ9i/o5jMK23c8NTat3bXDlRhkvpkACgsHbv GmCFBu7H2i0S3itQoioo/1M= =h3+C -----END PGP SIGNATURE-----
Dec 09 2005
prev sibling parent reply "Walter Bright" <newshound digitalmars.com> writes:
"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>
Dec 10 2005
parent reply James Dunne <james.jdunne gmail.com> writes:
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>

Dec 14 2005
parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
James Dunne wrote:
 Walter Bright wrote:

 Why not translate it to D? <g>


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.
Dec 15 2005
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stewart Gordon schrieb am 2005-12-15:
 James Dunne wrote:
 Walter Bright wrote:

 Why not translate it to D? <g>


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 -----BEGIN PGP SIGNATURE----- iD8DBQFDo0MS3w+/yD4P9tIRAusZAKCtM1w4GMkSaRqgwBtK/CbOfHUybACgkMor M4vzHGAkwJqLkSk/qHyZElM= =Saa4 -----END PGP SIGNATURE-----
Dec 16 2005