#19 Executing tests in protected mode

Unstable_(example)
open
nobody
None
5
2012-10-25
2011-07-25
Flid
No

Every test is executed in a separate process. It allows main program not to hang or crash when the test does.
Applications that runs a test is protected from deadly signals (SIGSEGV, FPE and other), any other test's crashes and its hanging.
All the asserts from the test body are being sent to the main process through the shared memory. There are some more things to do, but I want to know that what I do is useful. If it is, I'll do the following:
- Remove the memory limit (now only 1Mb of asserts data can be returned to main process)
- Add correct description output to all the modes (Only basic mode works correctly now)
- You'll find other bugs, I'll fix it.

Added global functions:
set_protected_mode_on(void) - call it before the test run, and it will be executed in protected mode.
set_protected_mode_off(void)
set_test_timeout(unsigned int seconds) - set time in seconds for test to run. After that time test will be terminated. Set to 0 to disable this feature.

-Flid

Discussion

  • Flid

    Flid - 2011-07-25

    patch for sources 2.1-2

     
  • Flid

    Flid - 2011-07-25

    By the way, the new version of CUnit seems to be backward binary compatible with the old one.

     


Anonymous

Cancel  Add attachments





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

Sign up for the SourceForge newsletter:





No, thanks