1 #ifdef HAVE_CONFIG_H
2 # include <config.h>
3 #endif
4 
5 #include <stdio.h>
6 #include <unistd.h>
7 
8 #ifdef _WIN32
9 # include <evil_private.h> /* pipe */
10 #endif
11 
12 #include <Eina.h>
13 #include <Ecore.h>
14 
15 #include "ecore_suite.h"
16 
17 #define DEBUG 0
18 
19 /////////////////////////////////////////////////////////////////////////////
20 static Eina_Thread_Queue *thq1, *thq2, *thqmaster;
21 
22 /////////////////////////////////////////////////////////////////////////////
23 typedef struct
24 {
25    Eina_Thread_Queue_Msg  head;
26    int                    value;
27    char                   pad[10];
28 } Msg;
29 
30 static void
th1_do(void * data EINA_UNUSED,Ecore_Thread * th)31 th1_do(void *data EINA_UNUSED, Ecore_Thread *th)
32 {
33    int val = 100;
34 
35    for (;;)
36      {
37         Msg *msg;
38         void *ref;
39 
40         msg = eina_thread_queue_send(thq1, sizeof(Msg), &ref);
41         if (!msg) fail();
42         msg->value = val;
43         memset(msg->pad, 0x32, 10);
44         eina_thread_queue_send_done(thq1, ref);
45         if (val == 1000 || (ecore_thread_check(th))) break;
46         val++;
47      }
48 }
49 
50 static void
th2_do(void * data EINA_UNUSED,Ecore_Thread * th)51 th2_do(void *data EINA_UNUSED, Ecore_Thread *th)
52 {
53    int val;
54 
55    for (;;)
56      {
57         Msg *msg;
58         void *ref;
59 
60         msg = eina_thread_queue_wait(thq1, &ref);
61         if (!msg) fail();
62         val = msg->value;
63         eina_thread_queue_wait_done(thq1, ref);
64 
65         msg = eina_thread_queue_send(thq2, sizeof(Msg), &ref);
66         if (!msg) fail();
67         msg->value = val;
68         memset(msg->pad, 0x32, 10);
69         eina_thread_queue_send_done(thq2, ref);
70         if (val == 1000 || (ecore_thread_check(th))) break;
71      }
72 }
73 
EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t1)74 EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t1)
75 {
76    int val = 99;
77    Ecore_Thread *eth1, *eth2;
78 
79    thq1 = eina_thread_queue_new();
80    if (!thq1) fail();
81    thq2 = eina_thread_queue_new();
82    if (!thq2) fail();
83    eth1 = ecore_thread_feedback_run(th1_do, NULL, NULL, NULL, NULL, EINA_TRUE);
84    eth2 = ecore_thread_feedback_run(th2_do, NULL, NULL, NULL, NULL, EINA_TRUE);
85 
86    for (;;)
87      {
88         Msg *msg;
89         void *ref;
90         msg = eina_thread_queue_wait(thq2, &ref);
91         if (!msg) fail();
92         if (DEBUG) printf("V: %i   [%i]\n", msg->value, eina_thread_queue_pending_get(thq2));
93         if (msg->value != (val + 1))
94           {
95              ck_abort_msg("ERRR %i not next after %i\n", msg->value, val);
96           }
97         val = msg->value;
98         eina_thread_queue_wait_done(thq2, ref);
99         if (val == 1000) break;
100      }
101    ecore_thread_wait(eth1, 0.1);
102    ecore_thread_wait(eth2, 0.1);
103    eina_thread_queue_free(thq1);
104    eina_thread_queue_free(thq2);
105 }
106 EFL_END_TEST
107 
108 /////////////////////////////////////////////////////////////////////////////
109 typedef struct
110 {
111    Eina_Thread_Queue_Msg  head;
112    int ops[1];
113 } Msg2;
114 
115 static volatile int msgs = 0;
116 
117 static void
thspeed2_do(void * data EINA_UNUSED,Ecore_Thread * th)118 thspeed2_do(void *data EINA_UNUSED, Ecore_Thread *th)
119 {
120    Msg2 *msg;
121    void *ref;
122 
123    for (;;)
124      {
125         msg = eina_thread_queue_wait(thq1, &ref);
126         if (msg)
127           {
128              msgs++;
129              eina_thread_queue_wait_done(thq1, ref);
130           }
131         if (msgs == 1000 || (ecore_thread_check(th)))
132           {
133              if (DEBUG) printf("msgs done\n");
134              break;
135           }
136      }
137 }
138 
EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t2)139 EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t2)
140 {
141    Msg2 *msg;
142    void *ref;
143    int i, mcount;
144    Ecore_Thread *th;
145 
146    thq1 = eina_thread_queue_new();
147    if (!thq1) fail();
148    th = ecore_thread_feedback_run(thspeed2_do, NULL, NULL, NULL, NULL, EINA_TRUE);
149 
150    for (i = 0; i < 1000; i++)
151      {
152         msg = eina_thread_queue_send(thq1, sizeof(Msg2), &ref);
153         if (!msg) fail();
154         if (msg) eina_thread_queue_send_done(thq1, ref);
155      }
156    ecore_thread_wait(th, 100.0);
157    mcount = msgs;
158    if (mcount < 1000)
159      {
160         ck_abort_msg("ERR: not enough messages received -> %i\n", mcount);
161      }
162    if (DEBUG) printf("%i messages sent\n", i);
163    ecore_thread_wait(th, 0.1);
164    eina_thread_queue_free(thq1);
165 }
166 EFL_END_TEST
167 
168 /////////////////////////////////////////////////////////////////////////////
169 typedef struct
170 {
171    Eina_Thread_Queue_Msg  head;
172    int                    value;
173 } Msg3;
174 
175 static void
th31_do(void * data EINA_UNUSED,Ecore_Thread * th)176 th31_do(void *data EINA_UNUSED, Ecore_Thread *th)
177 {
178    int val = 100;
179 
180    for (;;)
181      {
182         Msg3 *msg;
183         void *ref;
184 
185         msg = eina_thread_queue_send(thq1, sizeof(Msg3), &ref);
186         if (!msg) fail();
187         msg->value = val;
188         eina_thread_queue_send_done(thq1, ref);
189         val++;
190         if (val == 1100 || (ecore_thread_check(th))) break;
191      }
192 }
193 
194 static void
th32_do(void * data EINA_UNUSED,Ecore_Thread * th)195 th32_do(void *data EINA_UNUSED, Ecore_Thread *th)
196 {
197    int val = 100;
198 
199    for (;;)
200      {
201         Msg3 *msg;
202         void *ref;
203 
204         msg = eina_thread_queue_send(thq2, sizeof(Msg3), &ref);
205         if (!msg) fail();
206         msg->value = val;
207         eina_thread_queue_send_done(thq2, ref);
208         val++;
209         if (val == 1100 || (ecore_thread_check(th))) break;
210      }
211 }
212 
EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t3)213 EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t3)
214 {
215    int val1 = 99, val2 = 99, cnt = 0;
216    Eina_Thread_Queue *parent;
217    Ecore_Thread *eth1, *eth2;
218 
219    thq1 = eina_thread_queue_new();
220    if (!thq1) fail();
221    thq2 = eina_thread_queue_new();
222    if (!thq2) fail();
223    thqmaster = eina_thread_queue_new();
224    if (!thqmaster) fail();
225    eina_thread_queue_parent_set(thq1, thqmaster);
226    eina_thread_queue_parent_set(thq2, thqmaster);
227 
228    parent = eina_thread_queue_parent_get(thq1);
229    fail_if(parent != thqmaster);
230    parent = eina_thread_queue_parent_get(thq2);
231    fail_if(parent != thqmaster);
232 
233    eth1 = ecore_thread_feedback_run(th31_do, NULL, NULL, NULL, NULL, EINA_TRUE);
234    eth2 = ecore_thread_feedback_run(th32_do, NULL, NULL, NULL, NULL, EINA_TRUE);
235    for (;;)
236      {
237         Eina_Thread_Queue_Msg_Sub *sub;
238         Eina_Thread_Queue *thq;
239         Msg3 *msg;
240         void *ref;
241 
242         sub = eina_thread_queue_wait(thqmaster, &ref);
243         thq = sub->queue;
244         eina_thread_queue_wait_done(thqmaster, ref);
245 
246         msg = eina_thread_queue_wait(thq, &ref);
247         if (DEBUG) printf("V %09i: %p - %i  [%i]\n", cnt, thq, msg->value, eina_thread_queue_pending_get(thqmaster));
248         if (thq == thq1)
249           {
250              if ((val1 + 1) != msg->value)
251                {
252                   ck_abort_msg("ERR: thq1 val wrong %i -> %i\n", val1, msg->value);
253                }
254              val1 = msg->value;
255           }
256         else if (thq == thq2)
257           {
258              if ((val2 + 1) != msg->value)
259                {
260                   ck_abort_msg("ERR: thq2 val wrong %i -> %i\n", val2, msg->value);
261                }
262              val2 = msg->value;
263           }
264         else
265           {
266              ck_abort_msg("ERRR: unknown thq\n");
267           }
268         eina_thread_queue_wait_done(thq, ref);
269         cnt++;
270         if (cnt == 2000) break;
271      }
272    if (DEBUG) printf("enough msgs\n");
273    ecore_thread_wait(eth1, 0.1);
274    ecore_thread_wait(eth2, 0.1);
275    eina_thread_queue_free(thq1);
276    eina_thread_queue_free(thq2);
277    eina_thread_queue_free(thqmaster);
278 }
279 EFL_END_TEST
280 
281 /////////////////////////////////////////////////////////////////////////////
282 typedef struct
283 {
284    Eina_Thread_Queue_Msg  head;
285    int                    value;
286 } Msg4;
287 
288 static void
th41_do(void * data EINA_UNUSED,Ecore_Thread * th)289 th41_do(void *data EINA_UNUSED, Ecore_Thread *th)
290 {
291    int val = 100;
292 
293    for (;;)
294      {
295         Msg4 *msg;
296         void *ref;
297 
298         msg = eina_thread_queue_send(thq1, sizeof(Msg4), &ref);
299         msg->value = val;
300         eina_thread_queue_send_done(thq1, ref);
301         val++;
302         if (val == 1100 || (ecore_thread_check(th))) break;
303      }
304 }
305 
306 static void
th42_do(void * data EINA_UNUSED,Ecore_Thread * th)307 th42_do(void *data EINA_UNUSED, Ecore_Thread *th)
308 {
309    int val = 10000;
310 
311    for (;;)
312      {
313         Msg4 *msg;
314         void *ref;
315 
316         msg = eina_thread_queue_send(thq1, sizeof(Msg4), &ref);
317         msg->value = val;
318         eina_thread_queue_send_done(thq1, ref);
319         val++;
320         if (val == 11000 || (ecore_thread_check(th))) break;
321      }
322 }
323 
324 
EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t4)325 EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t4)
326 {
327    int cnt = 0;
328    int val1 = 99, val2 = 9999;
329    Ecore_Thread *eth1, *eth2;
330 
331    thq1 = eina_thread_queue_new();
332    if (!thq1) fail();
333    eth1 = ecore_thread_feedback_run(th41_do, NULL, NULL, NULL, NULL, EINA_TRUE);
334    eth2 = ecore_thread_feedback_run(th42_do, NULL, NULL, NULL, NULL, EINA_TRUE);
335    for (;;)
336      {
337         Msg4 *msg;
338         void *ref;
339         msg = eina_thread_queue_wait(thq1, &ref);
340         if (DEBUG) printf("V %08i: %i  [%i]\n", cnt, msg->value, eina_thread_queue_pending_get(thq1));
341         if (msg->value >= 10000)
342           {
343              if ((val2 + 1) != msg->value)
344                {
345                   ck_abort_msg("ERR: val wrong %i -> %i\n", val2, msg->value);
346                }
347              val2 = msg->value;
348           }
349         else
350           {
351              if ((val1 + 1) != msg->value)
352                {
353                   ck_abort_msg("ERR: val wrong %i -> %i\n", val1, msg->value);
354                }
355              val1 = msg->value;
356           }
357         eina_thread_queue_wait_done(thq1, ref);
358         cnt++;
359         if (cnt == 2000) break;
360      }
361    if (DEBUG) printf("msgs ok\n");
362    ecore_thread_wait(eth1, 0.1);
363    ecore_thread_wait(eth2, 0.1);
364    eina_thread_queue_free(thq1);
365 }
366 EFL_END_TEST
367 
368 /////////////////////////////////////////////////////////////////////////////
369 typedef struct
370 {
371    Eina_Thread_Queue_Msg  head;
372    int                    value;
373    char                   pad[10];
374 } Msg5;
375 
376 static Eina_Semaphore th4_sem;
377 
378 static void
th51_do(void * data EINA_UNUSED,Ecore_Thread * th)379 th51_do(void *data EINA_UNUSED, Ecore_Thread *th)
380 {
381    int val = 100;
382 
383    for (;;)
384      {
385         Msg5 *msg;
386         void *ref;
387 
388         msg = eina_thread_queue_send(thq1, sizeof(Msg5), &ref);
389         msg->value = val;
390         eina_thread_queue_send_done(thq1, ref);
391         if (val == 1100 || (ecore_thread_check(th))) break;
392         val++;
393      }
394 
395    eina_semaphore_release(&th4_sem, 1);
396 }
397 
398 static void
th52_do(void * data EINA_UNUSED,Ecore_Thread * th)399 th52_do(void *data EINA_UNUSED, Ecore_Thread *th)
400 {
401    int val;
402 
403    for (;;)
404      {
405         Msg5 *msg;
406         void *ref;
407 
408         msg = eina_thread_queue_wait(thq1, &ref);
409         if (!msg) fail();
410         val = msg->value;
411         eina_thread_queue_wait_done(thq1, ref);
412 
413         msg = eina_thread_queue_send(thq2, sizeof(Msg5), &ref);
414         if (!msg) fail();
415         msg->value = val;
416         eina_thread_queue_send_done(thq2, ref);
417         if (val == 1100 || (ecore_thread_check(th))) break;
418      }
419 
420    eina_semaphore_release(&th4_sem, 1);
421 }
422 
423 
EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t5)424 EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t5)
425 {
426    int val = 99;
427    Ecore_Thread *eth1, *eth2;
428 
429    eina_semaphore_new(&th4_sem, 0);
430 
431    thq1 = eina_thread_queue_new();
432    if (!thq1) fail();
433    thq2 = eina_thread_queue_new();
434    if (!thq2) fail();
435    eth1 = ecore_thread_feedback_run(th51_do, NULL, NULL, NULL, NULL, EINA_TRUE);
436    eth2 = ecore_thread_feedback_run(th52_do, NULL, NULL, NULL, NULL, EINA_TRUE);
437 
438    for (;;)
439      {
440         Msg5 *msg;
441         void *ref;
442         msg = eina_thread_queue_poll(thq2, &ref);
443         if (msg)
444           {
445              if (DEBUG) printf("V: %i   [%i]\n", msg->value, eina_thread_queue_pending_get(thq2));
446              if (msg->value != (val + 1))
447                {
448                   ck_abort_msg("ERRR %i not next after %i\n", msg->value, val);
449                }
450              val = msg->value;
451              eina_thread_queue_wait_done(thq2, ref);
452              if (val == 1100) break;
453           }
454         else
455           {
456              if (DEBUG) printf("V: none!\n");
457           }
458      }
459 
460    eina_semaphore_lock(&th4_sem);
461    eina_semaphore_lock(&th4_sem);
462 
463    // All done!
464    ecore_thread_wait(eth1, 0.1);
465    ecore_thread_wait(eth2, 0.1);
466    eina_semaphore_free(&th4_sem);
467    eina_thread_queue_free(thq1);
468    eina_thread_queue_free(thq2);
469 }
470 EFL_END_TEST
471 
472 /////////////////////////////////////////////////////////////////////////////
473 typedef struct
474 {
475    Eina_Thread_Queue_Msg  head;
476    int                    value;
477 } Msg6;
478 
479 static Eina_Spinlock msgnum_lock;
480 static volatile int msgnum = 0;
481 static Eina_Semaphore th6_sem;
482 const int EXIT_MESSAGE = -42;
483 
484 static void
th61_do(void * data EINA_UNUSED,Ecore_Thread * th)485 th61_do(void *data EINA_UNUSED, Ecore_Thread *th)
486 {
487    int val = 100;
488 
489    for (val = 100; val < 200; val++)
490      {
491         Msg6 *msg;
492         void *ref;
493 
494         msg = eina_thread_queue_send(thq1, sizeof(Msg6), &ref);
495         fail_if(!msg);
496         msg->value = val;
497         eina_thread_queue_send_done(thq1, ref);
498         if (ecore_thread_check(th)) break;
499      }
500 
501    eina_semaphore_release(&th6_sem, 1);
502    if (DEBUG) printf("%s: message sending done!\n", __func__);
503 }
504 
505 static void
th62_do(void * data EINA_UNUSED,Ecore_Thread * th)506 th62_do(void *data EINA_UNUSED, Ecore_Thread *th)
507 {
508    int cnt = 0;
509 
510    for (;;)
511      {
512         Msg6 *msg;
513         void *ref;
514         int val;
515 
516         msg = eina_thread_queue_wait(thq1, &ref);
517         fail_if(!msg);
518         if (DEBUG) printf("%s: v %08i: %i  [%i]\n", __func__, cnt, msg->value, eina_thread_queue_pending_get(thq1));
519         val = msg->value;
520         eina_thread_queue_wait_done(thq1, ref);
521         if (val == EXIT_MESSAGE || (ecore_thread_check(th))) break;
522         cnt++;
523         eina_spinlock_take(&msgnum_lock);
524         msgnum++;
525         eina_spinlock_release(&msgnum_lock);
526      }
527 
528    eina_spinlock_take(&msgnum_lock);
529    ck_assert_int_eq(msgnum, 100);
530    eina_spinlock_release(&msgnum_lock);
531    eina_semaphore_release(&th6_sem, 1);
532    if (DEBUG) printf("%s: message reading done!\n", __func__);
533 }
534 
535 static void
th63_do(void * data EINA_UNUSED,Ecore_Thread * th)536 th63_do(void *data EINA_UNUSED, Ecore_Thread *th)
537 {
538    int cnt = 0;
539 
540    for (;;)
541      {
542         Msg6 *msg;
543         void *ref;
544         int val;
545 
546         msg = eina_thread_queue_wait(thq1, &ref);
547         fail_if(!msg);
548         if (DEBUG) printf("%s: v %08i: %i  [%i]\n", __func__, cnt, msg->value, eina_thread_queue_pending_get(thq1));
549         val = msg->value;
550         eina_thread_queue_wait_done(thq1, ref);
551         if (val == EXIT_MESSAGE || (ecore_thread_check(th))) break;
552         cnt++;
553         eina_spinlock_take(&msgnum_lock);
554         msgnum++;
555         eina_spinlock_release(&msgnum_lock);
556      }
557 
558    eina_spinlock_take(&msgnum_lock);
559    ck_assert_int_eq(msgnum, 100);
560    eina_spinlock_release(&msgnum_lock);
561    eina_semaphore_release(&th6_sem, 1);
562    if (DEBUG) printf("%s: message reading done!\n", __func__);
563 }
564 
EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t6)565 EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t6)
566 {
567    int do_break = 0;
568    Msg6 *msg;
569    void *ref;
570    Ecore_Thread *eth1, *eth2, *eth3;
571 
572    if (DEBUG) setbuf(stdout, NULL);
573 
574    eina_semaphore_new(&th6_sem, 0);
575    eina_spinlock_new(&msgnum_lock);
576    thq1 = eina_thread_queue_new();
577    fail_if(!thq1);
578    eth1 = ecore_thread_feedback_run(th61_do, NULL, NULL, NULL, NULL, EINA_TRUE);
579    eth2 = ecore_thread_feedback_run(th62_do, NULL, NULL, NULL, NULL, EINA_TRUE);
580    eth3 = ecore_thread_feedback_run(th63_do, NULL, NULL, NULL, NULL, EINA_TRUE);
581 
582    // Spin until we reach 10000 messages sent
583    while (!do_break)
584      {
585         eina_spinlock_take(&msgnum_lock);
586         if (DEBUG) printf("msgnum %i\n", msgnum);
587         if (msgnum == 100) do_break = 1;
588         else ck_assert_int_lt(msgnum, 100);
589         eina_spinlock_release(&msgnum_lock);
590      }
591 
592    // Send exit message twice
593    msg = eina_thread_queue_send(thq1, sizeof(Msg6), &ref);
594    msg->value = EXIT_MESSAGE;
595    eina_thread_queue_send_done(thq1, ref);
596 
597    msg = eina_thread_queue_send(thq1, sizeof(Msg6), &ref);
598    msg->value = EXIT_MESSAGE;
599    eina_thread_queue_send_done(thq1, ref);
600 
601    // Wait for 3 threads
602    fail_if(!eina_semaphore_lock(&th6_sem));
603    fail_if(!eina_semaphore_lock(&th6_sem));
604    fail_if(!eina_semaphore_lock(&th6_sem));
605 
606    // All done!
607    ecore_thread_wait(eth1, 0.1);
608    ecore_thread_wait(eth2, 0.1);
609    ecore_thread_wait(eth3, 0.1);
610    eina_semaphore_free(&th6_sem);
611    eina_thread_queue_free(thq1);
612    eina_spinlock_free(&msgnum_lock);
613 
614 }
615 EFL_END_TEST
616 
617 /////////////////////////////////////////////////////////////////////////////
618 typedef struct
619 {
620    Eina_Thread_Queue_Msg  head;
621    int ops[1];
622 } Msg7;
623 
624 int p[2];
625 
626 static void
thspeed7_do(void * data EINA_UNUSED,Ecore_Thread * th)627 thspeed7_do(void *data EINA_UNUSED, Ecore_Thread *th)
628 {
629    Msg7 *msg;
630    void *ref;
631    int i;
632 
633    for (i = 0; i < 10000; i++)
634      {
635         msg = eina_thread_queue_send(thq1, sizeof(Msg7), &ref);
636         if (msg) eina_thread_queue_send_done(thq1, ref);
637         if (ecore_thread_check(th)) break;
638      }
639 }
640 
EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t7)641 EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t7)
642 {
643    Msg7 *msg;
644    void *ref;
645    int msgcnt = 0, ret;
646    Ecore_Thread *eth1;
647 
648    thq1 = eina_thread_queue_new();
649    if (!thq1) fail();
650    if (pipe(p) != 0)
651      {
652         ck_abort_msg("ERR: pipe create fail\n");
653      }
654    eina_thread_queue_fd_set(thq1, p[1]);
655 
656    ret = eina_thread_queue_fd_get(thq1);
657    fail_if(ret != p[1]);
658 
659    eth1 = ecore_thread_feedback_run(thspeed7_do, NULL, NULL, NULL, NULL, EINA_TRUE);
660    for (;;)
661      {
662         char buf;
663 
664         if (read(p[0], &buf, 1) != 1)
665           if (DEBUG) printf("Error reading from pipe\n");
666         msg = eina_thread_queue_wait(thq1, &ref);
667         if (msg)
668           {
669              eina_thread_queue_wait_done(thq1, ref);
670              msgcnt++;
671              if (DEBUG) printf("msgcnt: %i\n", msgcnt);
672           }
673         if (msgcnt == 10000) break;
674      }
675    if (DEBUG) printf("msg fd ok\n");
676    ecore_thread_wait(eth1, 0.1);
677    eina_thread_queue_free(thq1);
678    close(p[0]);
679    close(p[1]);
680 }
681 EFL_END_TEST
682 
ecore_test_ecore_thread_eina_thread_queue(TCase * tc EINA_UNUSED)683 void ecore_test_ecore_thread_eina_thread_queue(TCase *tc EINA_UNUSED)
684 {
685    tcase_add_test(tc, ecore_test_ecore_thread_eina_thread_queue_t1);
686    tcase_add_test(tc, ecore_test_ecore_thread_eina_thread_queue_t2);
687    tcase_add_test(tc, ecore_test_ecore_thread_eina_thread_queue_t3);
688 }
689 
ecore_test_ecore_thread_eina_thread_queue2(TCase * tc EINA_UNUSED)690 void ecore_test_ecore_thread_eina_thread_queue2(TCase *tc EINA_UNUSED)
691 {
692    tcase_add_test(tc, ecore_test_ecore_thread_eina_thread_queue_t4);
693    tcase_add_test(tc, ecore_test_ecore_thread_eina_thread_queue_t5);
694    tcase_add_test(tc, ecore_test_ecore_thread_eina_thread_queue_t6);
695    tcase_add_test(tc, ecore_test_ecore_thread_eina_thread_queue_t7);
696 }
697