summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-04-09 13:36:54 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-10 11:28:01 +0200
commit853e2c43cab2f2a5e3211705def20f868e297bc2 (patch)
treefb75e8427cef4dfa567509f1c7dda818ad85688e
parentc45f1346807ad8347d1911fb0475daa5e6aea29a (diff)
tests: remove random usleeps from ecore thread queue tests
Summary: fix T6851 Depends on D5881 Reviewers: stefan_schmidt Subscribers: cedric Maniphest Tasks: T6851 Differential Revision: https://phab.enlightenment.org/D5882
-rw-r--r--src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c b/src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c
index 13120e4f49..ef08354689 100644
--- a/src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c
+++ b/src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c
@@ -33,7 +33,6 @@ th1_do(void *data EINA_UNUSED, Ecore_Thread *th EINA_UNUSED)
33 Msg *msg; 33 Msg *msg;
34 void *ref; 34 void *ref;
35 35
36 usleep((rand() % 10) * 1000);
37 msg = eina_thread_queue_send(thq1, sizeof(Msg), &ref); 36 msg = eina_thread_queue_send(thq1, sizeof(Msg), &ref);
38 if (!msg) fail(); 37 if (!msg) fail();
39 msg->value = val; 38 msg->value = val;
@@ -57,7 +56,6 @@ th2_do(void *data EINA_UNUSED, Ecore_Thread *th EINA_UNUSED)
57 msg = eina_thread_queue_wait(thq1, &ref); 56 msg = eina_thread_queue_wait(thq1, &ref);
58 if (!msg) fail(); 57 if (!msg) fail();
59 val = msg->value; 58 val = msg->value;
60 usleep((rand() % 20) * 1000);
61 eina_thread_queue_wait_done(thq1, ref); 59 eina_thread_queue_wait_done(thq1, ref);
62 60
63 msg = eina_thread_queue_send(thq2, sizeof(Msg), &ref); 61 msg = eina_thread_queue_send(thq2, sizeof(Msg), &ref);
@@ -93,7 +91,6 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t1)
93 fail(); 91 fail();
94 } 92 }
95 val = msg->value; 93 val = msg->value;
96 usleep((rand() % 30) * 1000);
97 eina_thread_queue_wait_done(thq2, ref); 94 eina_thread_queue_wait_done(thq2, ref);
98 if (val == 1000) break; 95 if (val == 1000) break;
99 } 96 }
@@ -377,7 +374,6 @@ th51_do(void *data EINA_UNUSED, Ecore_Thread *th EINA_UNUSED)
377 Msg5 *msg; 374 Msg5 *msg;
378 void *ref; 375 void *ref;
379 376
380 usleep((rand() % 10) * 1000);
381 msg = eina_thread_queue_send(thq1, sizeof(Msg5), &ref); 377 msg = eina_thread_queue_send(thq1, sizeof(Msg5), &ref);
382 msg->value = val; 378 msg->value = val;
383 eina_thread_queue_send_done(thq1, ref); 379 eina_thread_queue_send_done(thq1, ref);
@@ -401,7 +397,6 @@ th52_do(void *data EINA_UNUSED, Ecore_Thread *th EINA_UNUSED)
401 msg = eina_thread_queue_wait(thq1, &ref); 397 msg = eina_thread_queue_wait(thq1, &ref);
402 if (!msg) fail(); 398 if (!msg) fail();
403 val = msg->value; 399 val = msg->value;
404 usleep((rand() % 20) * 1000);
405 eina_thread_queue_wait_done(thq1, ref); 400 eina_thread_queue_wait_done(thq1, ref);
406 401
407 msg = eina_thread_queue_send(thq2, sizeof(Msg5), &ref); 402 msg = eina_thread_queue_send(thq2, sizeof(Msg5), &ref);
@@ -442,14 +437,12 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t5)
442 fail(); 437 fail();
443 } 438 }
444 val = msg->value; 439 val = msg->value;
445 usleep((rand() % 10) * 1000);
446 eina_thread_queue_wait_done(thq2, ref); 440 eina_thread_queue_wait_done(thq2, ref);
447 if (val == 1100) break; 441 if (val == 1100) break;
448 } 442 }
449 else 443 else
450 { 444 {
451 if (DEBUG) printf("V: none!\n"); 445 if (DEBUG) printf("V: none!\n");
452 usleep((rand() % 10) * 1000);
453 } 446 }
454 } 447 }
455 448
@@ -489,7 +482,6 @@ th61_do(void *data EINA_UNUSED, Ecore_Thread *th EINA_UNUSED)
489 fail_if(!msg); 482 fail_if(!msg);
490 msg->value = val; 483 msg->value = val;
491 eina_thread_queue_send_done(thq1, ref); 484 eina_thread_queue_send_done(thq1, ref);
492 usleep(1);
493 } 485 }
494 486
495 eina_semaphore_release(&th6_sem, 1); 487 eina_semaphore_release(&th6_sem, 1);