I looked a bit deeper into the code, and I can't quite say I understand 
what's happening in there...

The main thing I don't really understand is what is the output supposed to 
be compared with, in the 'L' mode (testing a list of files).  Right now, it 
appears that:

(a) CompareFiles() isn't even being called, because matchdata is empty.
(b) matchdata will always be empty in 'L' mode.  Apparently, matchdata will 
be filled with the 'EXPECT' portion of a standard .phpt file (this should 
be mentioned in the notes, the notes refer to the 'tests' directory, which 
also contains non .phpt files...)
(c) The semantics of CompareFiles(), which was compare two files, was 
inconsistent with the semantics the caller to CompareFiles() expected - it 
was sending the matchdata as a string, expecting this string to be compared 
with the output file...

What I think should be done:

(a) A new function should be implemented, which compares a string with a 
file (to allow for this 'EXPECT' thing).
(b) For non .phpt files, we should first perform one round of requests in 
our main thread, so that we know what output we expect (we take an 
assumption that this output is correct, which may not necessarily be a 
correct assumption, but it should do for our purposes (looking for 
crashes/inconsistencies)).  Then, we'll spawn the threads, and compare the 
results of each file with the original file that we created in the main thread.

Sounds right?

Zeev

At 04:07 15/1/2001, Shane Caraveo wrote:
>Hi everyone,
>
>I think i've got a very good start on this program.  It acts as a isapi
>server, loading php4_isapi.dll, starting several threads, and feeding
>them files to process.  It can use either a list of files, or the phpt
>test files from the source distribution, in which case it will privide
>an OK or FAIL for each test, and totals at the end.  I wrote the program
>to provide a consistent way to test the isapi dll in a multithreaded
>fashion, without having to run/debug it via IIS (which we all know can
>be a pain).  So far, things seem good, though some tests did fail.
>There is also a zend_debug_output_string function call that always stops
>a debug compile in it's tracks.  Anyway, I hope other win developers
>will find use in this program to help get isapi rolling as a production
>possibility.  One note, CompareFile() will choke on large test files
>because I've been lazy and used CStrings.  Stresstest is located in cvs
>under the sapi\isapi\stresstest directory.
>
>Shane Caraveo
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Zeev Suraski <[EMAIL PROTECTED]>
CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to