forked from enlightenment/efl
tests/ecore: add stress test for main loop signal handling
this explodes after about 500 signals, so make it 1000 for a good test Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10026
This commit is contained in:
parent
aae2e49744
commit
af5abbe4bc
|
@ -28,7 +28,30 @@ EFL_START_TEST(ecore_test_job)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
#ifndef _WIN32
|
||||
static void
|
||||
_ecore_signal_job(void *data EINA_UNUSED)
|
||||
{
|
||||
EXPECT_ERROR_START;
|
||||
for (unsigned int i = 0; i < 1000; i++)
|
||||
raise(SIGUSR2);
|
||||
ecore_main_loop_quit();
|
||||
EXPECT_ERROR_END;
|
||||
}
|
||||
|
||||
EFL_START_TEST(ecore_test_job_signal)
|
||||
{
|
||||
ecore_job_add(_ecore_signal_job, NULL);
|
||||
|
||||
ecore_main_loop_begin();
|
||||
}
|
||||
EFL_END_TEST
|
||||
#endif
|
||||
|
||||
void ecore_test_ecore_job(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, ecore_test_job);
|
||||
#ifndef _WIN32
|
||||
tcase_add_test(tc, ecore_test_job_signal);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue