summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-09-19 14:15:45 -0400
committerCedric Bail <cedric.bail@free.fr>2019-09-19 14:37:14 -0700
commitaf5abbe4bcdd3ae0a687ef77b38d942e3249377d (patch)
tree08167476013891c2c820361756a2fe73c62365c5 /src/tests
parentaae2e49744824d8698262fca943b5c47c94ee560 (diff)
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
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/ecore/ecore_test_job.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/ecore/ecore_test_job.c b/src/tests/ecore/ecore_test_job.c
index 5a2d6f3f75..7f3e6ad7b4 100644
--- a/src/tests/ecore/ecore_test_job.c
+++ b/src/tests/ecore/ecore_test_job.c
@@ -28,7 +28,30 @@ EFL_START_TEST(ecore_test_job)
28} 28}
29EFL_END_TEST 29EFL_END_TEST
30 30
31#ifndef _WIN32
32static void
33_ecore_signal_job(void *data EINA_UNUSED)
34{
35 EXPECT_ERROR_START;
36 for (unsigned int i = 0; i < 1000; i++)
37 raise(SIGUSR2);
38 ecore_main_loop_quit();
39 EXPECT_ERROR_END;
40}
41
42EFL_START_TEST(ecore_test_job_signal)
43{
44 ecore_job_add(_ecore_signal_job, NULL);
45
46 ecore_main_loop_begin();
47}
48EFL_END_TEST
49#endif
50
31void ecore_test_ecore_job(TCase *tc) 51void ecore_test_ecore_job(TCase *tc)
32{ 52{
33 tcase_add_test(tc, ecore_test_job); 53 tcase_add_test(tc, ecore_test_job);
54#ifndef _WIN32
55 tcase_add_test(tc, ecore_test_job_signal);
56#endif
34} 57}