1 test was wrong. it didn't wait for the thread to exit before checking
msg count recieved. fixed. race condition here.
also reduce the sheer message counts sent - it makes the suite take a
lot longer than is sane and als consume massive amounts of log space
in /tmp as a result.
ecore_test_ecore_thread_eina_thread_queue_t6 failed often for me.
eina_thread_queue_wait() was returning NULL.
I believe this is because the test case ended abruptly without
waiting for the threads to finish. Indeed, both threads tried
hard to reach 10000 messages but it didn't make sense for them
both to reach this value, only one would end there.
This patch adds an exit message sent by thread 1 to the two other
threads, and all threads are waited upon using a single semaphore.
Note: This also renames some functions to match their test case
number.
@raster
fill in the padding of mesages (10 bytes) with something so valgrinds
can be happy and use vlatiole for msgs count as the msgs num should
have been incremented already before the msg sned is done and main
thread/loop gets the msg
check that ecore_test_ecore_thread_eina_thread_queue_t6 doesn't
enter in an infinite loop if something goes wrong, if the main thread
doesn't receive the message number 10000
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
If we are going to test for 10000000 messages we should not print out for each
of them to stdout. The log file for ecore_suite will catch them all. It ended
up being 199MB on my machine just filled with these debug statements.
I left it in in case someone needs it for debugging but we should not have it
on by default.
@feature
This is a new feature for eina (and EFL) - a zero-copy thread message
queue for sending messages from one thread to another or from the
ecore mainloop to or back to the mainloop from threads. It has a
complete test suite too.