4aebb6cc110fd871926aa3e692891a5236ca7c1f |
|
07-Jun-2016 |
Cyril Hrubis <chrubis@suse.cz> |
lib/tst_test.c: Run test in child process This commit moves the actuall test to a child process. The parent process now serves two purposes. It sets up an alarm timer that kills the test on a timeout and also does the library setup and cleanup which means that the test temporary directory is removed even if the test crashed in one of the functions exported in tst_test structure. The timeout is defined per test run, which is either one execution of test_all() function or single loop over the test() function. The timeout is reset after each test run by the test library by sending SIGUSR1 to the parent. The default timeout is set to 300 seconds and can be overriden by setting tst_test->timeout variable. There is also LTP_TIMEOUT_MUL env variable that, if set to float > 1, is used to multiply the timeout before the start of a test. This is especially intended for slow machines where the default timeout may not be enough. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Acked-by: Jan Stancek <jstancek@redhat.com>
/external/ltp/lib/newlib_tests/test10.c
|