[ros-dev] [ros-diffs] [hyperion] 38461: modified tests/pseh2/psehtest.c finally_13 test re-enabled, as it doesn't crash anymore finally_14 test fixed. Now we know how exceptions thrown in a __finally are supposed to be handled PSEH test suite now has 91 tests and passes all of them with both GCC and Visual C++

Timo Kreuzer timo.kreuzer at web.de
Tue Dec 30 17:49:04 CET 2008


About the SEH tests.
The tests are nice, but there are 2 things that makes me think the tests
are cheating.

1.) All used variables are static. That means the optimizer is mostly
out of the game. Is this planned to be a requirement (static or volatile
variables)?
2.) The tests use return_positive() and return_zero() functions. Another
way to stop the optimizer from doing his work, because function calls
act as sequence points and the result isn't known at compile time. But
this is far from practical. If you replace them with compiler constants,
the optimizer will try to remove these assignmnents if possible.

So I did some testing. After removing the static, I got 1 error:
psehtest.c:2490: Test failed: test_continue_search_3 failed

After replacing the return_x, ... functions with macros I got 3 errors:
psehtest.c:2486: Test failed: test_continue_search_6 failed
psehtest.c:2486: Test failed: test_execute_handler_12 failed
psehtest.c:2486: Test failed: test_continue_execution_12 failed

Same with full and normal optimisation.

Timo


Aleksey Bragin schrieb:
> Just wanted to tell this is a great work, and with such test suite we  
> will always notice if something breaks.
>
>
> WBR,
> Aleksey Bragin.
>
> On Dec 30, 2008, at 7:04 AM, hyperion at svn.reactos.org wrote:
>
>   
>> Author: hyperion
>> Date: Mon Dec 29 22:04:51 2008
>> New Revision: 38461
>>
>> URL: http://svn.reactos.org/svn/reactos?rev=38461&view=rev
>> Log:
>> modified   tests/pseh2/psehtest.c
>>    finally_13 test re-enabled, as it doesn't crash anymore
>>    finally_14 test fixed. Now we know how exceptions thrown in a  
>> __finally are supposed to be handled
>>    PSEH test suite now has 91 tests and passes all of them with  
>> both GCC and Visual C++
>>     
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-dev/attachments/20081230/84456f38/attachment.html 


More information about the Ros-dev mailing list