summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-04-09 13:36:57 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-10 11:28:01 +0200
commite5fc5f0263c2ea034e6119971c345f82b35559ed (patch)
tree851eb409ed58a36f010167ff454def43d45a8fce
parent59520a57cb33266974d7a51c96bcd208fc7c94ca (diff)
tests: quiet useless printf spam from thread queue tests
Summary: Depends on D5886 Reviewers: stefan_schmidt Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5887
-rw-r--r--src/tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c37
1 files changed, 14 insertions, 23 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 ef08354689..9cfd283b9a 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
@@ -87,8 +87,7 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t1)
87 if (DEBUG) printf("V: %i [%i]\n", msg->value, eina_thread_queue_pending_get(thq2)); 87 if (DEBUG) printf("V: %i [%i]\n", msg->value, eina_thread_queue_pending_get(thq2));
88 if (msg->value != (val + 1)) 88 if (msg->value != (val + 1))
89 { 89 {
90 printf("ERRR %i not next after %i\n", msg->value, val); 90 ck_abort_msg("ERRR %i not next after %i\n", msg->value, val);
91 fail();
92 } 91 }
93 val = msg->value; 92 val = msg->value;
94 eina_thread_queue_wait_done(thq2, ref); 93 eina_thread_queue_wait_done(thq2, ref);
@@ -123,7 +122,7 @@ thspeed2_do(void *data EINA_UNUSED, Ecore_Thread *th EINA_UNUSED)
123 } 122 }
124 if (msgs == 1000) 123 if (msgs == 1000)
125 { 124 {
126 printf("msgs done\n"); 125 if (DEBUG) printf("msgs done\n");
127 break; 126 break;
128 } 127 }
129 } 128 }
@@ -150,10 +149,9 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t2)
150 mcount = msgs; 149 mcount = msgs;
151 if (mcount < 1000) 150 if (mcount < 1000)
152 { 151 {
153 printf("ERR: not enough messages recieved -> %i\n", mcount); 152 ck_abort_msg("ERR: not enough messages recieved -> %i\n", mcount);
154 fail();
155 } 153 }
156 printf("%i messages sent\n", i); 154 if (DEBUG) printf("%i messages sent\n", i);
157 155
158} 156}
159EFL_END_TEST 157EFL_END_TEST
@@ -241,8 +239,7 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t3)
241 { 239 {
242 if ((val1 + 1) != msg->value) 240 if ((val1 + 1) != msg->value)
243 { 241 {
244 printf("ERR: thq1 val wrong %i -> %i\n", val1, msg->value); 242 ck_abort_msg("ERR: thq1 val wrong %i -> %i\n", val1, msg->value);
245 fail();
246 } 243 }
247 val1 = msg->value; 244 val1 = msg->value;
248 } 245 }
@@ -250,21 +247,19 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t3)
250 { 247 {
251 if ((val2 + 1) != msg->value) 248 if ((val2 + 1) != msg->value)
252 { 249 {
253 printf("ERR: thq2 val wrong %i -> %i\n", val2, msg->value); 250 ck_abort_msg("ERR: thq2 val wrong %i -> %i\n", val2, msg->value);
254 fail();
255 } 251 }
256 val2 = msg->value; 252 val2 = msg->value;
257 } 253 }
258 else 254 else
259 { 255 {
260 printf("ERRR: unknown thq\n"); 256 ck_abort_msg("ERRR: unknown thq\n");
261 fail();
262 } 257 }
263 eina_thread_queue_wait_done(thq, ref); 258 eina_thread_queue_wait_done(thq, ref);
264 cnt++; 259 cnt++;
265 if (cnt == 2000) break; 260 if (cnt == 2000) break;
266 } 261 }
267 printf("enough msgs\n"); 262 if (DEBUG) printf("enough msgs\n");
268 263
269} 264}
270EFL_END_TEST 265EFL_END_TEST
@@ -331,8 +326,7 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t4)
331 { 326 {
332 if ((val2 + 1) != msg->value) 327 if ((val2 + 1) != msg->value)
333 { 328 {
334 printf("ERR: val wrong %i -> %i\n", val2, msg->value); 329 ck_abort_msg("ERR: val wrong %i -> %i\n", val2, msg->value);
335 fail();
336 } 330 }
337 val2 = msg->value; 331 val2 = msg->value;
338 } 332 }
@@ -340,8 +334,7 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t4)
340 { 334 {
341 if ((val1 + 1) != msg->value) 335 if ((val1 + 1) != msg->value)
342 { 336 {
343 printf("ERR: val wrong %i -> %i\n", val1, msg->value); 337 ck_abort_msg("ERR: val wrong %i -> %i\n", val1, msg->value);
344 fail();
345 } 338 }
346 val1 = msg->value; 339 val1 = msg->value;
347 } 340 }
@@ -349,7 +342,7 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t4)
349 cnt++; 342 cnt++;
350 if (cnt == 2000) break; 343 if (cnt == 2000) break;
351 } 344 }
352 printf("msgs ok\n"); 345 if (DEBUG) printf("msgs ok\n");
353 346
354} 347}
355EFL_END_TEST 348EFL_END_TEST
@@ -433,8 +426,7 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t5)
433 if (DEBUG) printf("V: %i [%i]\n", msg->value, eina_thread_queue_pending_get(thq2)); 426 if (DEBUG) printf("V: %i [%i]\n", msg->value, eina_thread_queue_pending_get(thq2));
434 if (msg->value != (val + 1)) 427 if (msg->value != (val + 1))
435 { 428 {
436 printf("ERRR %i not next after %i\n", msg->value, val); 429 ck_abort_msg("ERRR %i not next after %i\n", msg->value, val);
437 fail();
438 } 430 }
439 val = msg->value; 431 val = msg->value;
440 eina_thread_queue_wait_done(thq2, ref); 432 eina_thread_queue_wait_done(thq2, ref);
@@ -630,8 +622,7 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t7)
630 if (!thq1) fail(); 622 if (!thq1) fail();
631 if (pipe(p) != 0) 623 if (pipe(p) != 0)
632 { 624 {
633 printf("ERR: pipe create fail\n"); 625 ck_abort_msg("ERR: pipe create fail\n");
634 fail();
635 } 626 }
636 eina_thread_queue_fd_set(thq1, p[1]); 627 eina_thread_queue_fd_set(thq1, p[1]);
637 628
@@ -653,7 +644,7 @@ EFL_START_TEST(ecore_test_ecore_thread_eina_thread_queue_t7)
653 } 644 }
654 if (msgcnt == 10000) break; 645 if (msgcnt == 10000) break;
655 } 646 }
656 printf("msg fd ok\n"); 647 if (DEBUG) printf("msg fd ok\n");
657 648
658} 649}
659EFL_END_TEST 650EFL_END_TEST