From: Florian Krohm Date: Sun, 11 Sep 2011 14:39:02 +0000 (+0000) Subject: This testcase is sensitive to some sleep period. On slower X-Git-Tag: svn/VALGRIND_3_7_0~206 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68ca6b20d4b85c7bd2b1b703e979f44773f2162f;p=thirdparty%2Fvalgrind.git This testcase is sensitive to some sleep period. On slower 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 --- diff --git a/helgrind/tests/annotate_hbefore.c b/helgrind/tests/annotate_hbefore.c index c05c8c255d..5f9694240f 100644 --- a/helgrind/tests/annotate_hbefore.c +++ b/helgrind/tests/annotate_hbefore.c @@ -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; } diff --git a/helgrind/tests/annotate_hbefore.vgtest b/helgrind/tests/annotate_hbefore.vgtest index 9dc936b246..1e37939527 100644 --- a/helgrind/tests/annotate_hbefore.vgtest +++ b/helgrind/tests/annotate_hbefore.vgtest @@ -1,3 +1,2 @@ -prereq: (../../tests/arch_test s390x; if [ $? = 0 ]; then false; else true; fi) vgopts: -q prog: annotate_hbefore