about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-03-31 11:06:18 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-03-31 11:06:18 +0200
commitea0ee7c7aa8bc6f6fa2abcc98936ac53b629e30c (patch)
tree7d3648bf5bd4ada17e96286a56a0235ccbdfe30c /tests
parent18a1cc77d49a0dcfb1f5f00c293bcdd6f0d21821 (diff)
downloadbox64-ea0ee7c7aa8bc6f6fa2abcc98936ac53b629e30c.tar.gz
box64-ea0ee7c7aa8bc6f6fa2abcc98936ac53b629e30c.zip
Try to fix flakyness of test11
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test11bin17352 -> 22040 bytes
-rw-r--r--tests/test11.c5
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/test11 b/tests/test11
index 974d8728..48690872 100755
--- a/tests/test11
+++ b/tests/test11
Binary files differdiff --git a/tests/test11.c b/tests/test11.c
index 7d790875..615949fc 100644
--- a/tests/test11.c
+++ b/tests/test11.c
@@ -11,6 +11,7 @@ void bar(void);
 #define checkResults(string, val) {             \
  if (val) {                                     \
    printf("Failed with %d at %s", val, string); \
+   fflush(stdout);                               \
    exit(1);                                     \
  }                                              \
 }
@@ -39,6 +40,7 @@ void *thread_run(void *parm)
    threadparm_t     *gData;
 
    printf("Thread %d: Entered (%d/%d)\n", (pthread_self()==thread[0])?1:2, TLS_data1, TLS_data2);
+   fflush(stdout);
 
    gData = (threadparm_t *)parm;
 
@@ -55,6 +57,7 @@ void *thread_run(void *parm)
 void foo() {
    printf("Thread %d: foo(), TLS data=%d %d \"%s\"\n",
           (pthread_self()==thread[0])?1:2, TLS_data1, TLS_data2, TLS_data3);
+   fflush(stdout);
    while(!thread[1])
       usleep(300);
    if(pthread_self()==thread[0])
@@ -65,6 +68,7 @@ void foo() {
 void bar() {
    printf("Thread %d: bar(), TLS data=%d %d \"%s\"\n",
           (pthread_self()==thread[0])?1:2, TLS_data1, TLS_data2, TLS_data3);
+   fflush(stdout);
    return;
 }
  
@@ -76,6 +80,7 @@ int main(int argc, char **argv)
   threadparm_t          gData[NUMTHREADS];
  
   printf("Create/start %d threads\n", NUMTHREADS);
+  fflush(stdout);
   for (i=0; i < NUMTHREADS; i++) { 
      /* Create per-thread TLS data and pass it to the thread */
      gData[i].data1 = i;