]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
This testcase is sensitive to some sleep period. On slower
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 11 Sep 2011 14:39:02 +0000 (14:39 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 11 Sep 2011 14:39:02 +0000 (14:39 +0000)
machines we need to sleep longer. See bugzilla #268623 comment #2.
So let's sleep 500ms instead of 100ms, get rid of the load
barrier and enable the testcase for s390x again.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12031

helgrind/tests/annotate_hbefore.c
helgrind/tests/annotate_hbefore.vgtest

index c05c8c255daaf6daf2b0505c59144d8416fe7735..5f9694240fe28141e7c9631f59f67376488ed806 100644 (file)
@@ -235,9 +235,9 @@ int main ( void )
 int shared_var = 0;  // is not raced upon
 
 
-void delay100ms ( void )
+void delay500ms ( void )
 {
-   struct timespec ts = { 0, 100 * 1000 * 1000 };
+   struct timespec ts = { 0, 500 * 1000 * 1000 };
    nanosleep(&ts, NULL);
 }
 
@@ -245,13 +245,8 @@ void do_wait ( UWord* w )
 {
   UWord w0 = *w;
   UWord volatile * wV = w;
-  while (*wV == w0) {
-#ifdef VGA_s390x
-    asm volatile ("bcr 15,0\n\t");  /* load barrier */
-#else
+  while (*wV == w0)
     ;
-#endif
-  }
   ANNOTATE_HAPPENS_AFTER(w);
 }
 
@@ -266,11 +261,11 @@ void do_signal ( UWord* w )
 void* thread_fn1 ( void* arg )
 {
   UWord* w = (UWord*)arg;
-  delay100ms();    // ensure t2 gets to its wait first
+  delay500ms();    // ensure t2 gets to its wait first
   shared_var = 1;  // first access
   do_signal(w);    // cause h-b edge to second thread
 
-  delay100ms();
+  delay500ms();
   return NULL;
 }
 
@@ -280,7 +275,7 @@ void* thread_fn2 ( void* arg )
   do_wait(w);      // wait for h-b edge from first thread
   shared_var = 2;  // second access
 
-  delay100ms();
+  delay500ms();
   return NULL;
 }
 
index 9dc936b246d21ec511b81aad7fe5fa9681ec41ad..1e3793952791197fe2cd3eeb6c368a721b0aa20b 100644 (file)
@@ -1,3 +1,2 @@
-prereq:  (../../tests/arch_test s390x; if [ $? = 0 ]; then false; else true; fi)
 vgopts: -q
 prog: annotate_hbefore