tests: reduce looping in slstr_thread thread callbacks
authorMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 30 Mar 2018 20:58:31 +0000 (16:58 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 10 Apr 2018 13:25:53 +0000 (22:25 +0900)
this works out to the same number of total tests as slstr_many but
now split across all the threads

fix T6846

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
src/tests/eina/eina_test_slstr.c

index 42fd845..fd17cef 100644 (file)
@@ -126,9 +126,9 @@ EFL_START_TEST(slstr_slstr_printf)
 EFL_END_TEST
 
 static void
-_many_do(void)
+_many_do(Eina_Bool threaded)
 {
-   const int many = 2048;
+   const int many = threaded ? 256 : 2048;
    Eina_Slstr *str;
    int k;
 
@@ -145,7 +145,7 @@ _many_do(void)
 EFL_START_TEST(slstr_many)
 {
 
-   _many_do();
+   _many_do(0);
 
    eina_slstr_local_clear();
 
@@ -155,7 +155,7 @@ EFL_END_TEST
 static void *
 _thread_cb(void *data EINA_UNUSED, Eina_Thread th EINA_UNUSED)
 {
-   _many_do();
+   _many_do(1);
 
    return NULL;
 }