]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Rewrite test to not use function clock_gettime. The purpose
authorFlorian Krohm <florian@eich-krohm.de>
Fri, 28 Oct 2011 00:11:44 +0000 (00:11 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Fri, 28 Oct 2011 00:11:44 +0000 (00:11 +0000)
of this is to not have to link against -lrt because that causes
a different back-trace on certain x86 and s390x environments.
See the thread with subject
"helgrind/tests/cond_timedwait_invalid failing on x86"
on valgrind-developers for more details.

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

helgrind/tests/Makefile.am
helgrind/tests/cond_timedwait_invalid.c

index 3271a5427537caf8cb9bd051d981e895018cb645..3ca723b72b4161b45b5fe4ee2e520bcc16afa50a 100644 (file)
@@ -185,8 +185,3 @@ annotate_hbefore_CFLAGS = $(AM_CFLAGS) -mdynamic-no-pic
 else
 annotate_hbefore_CFLAGS = $(AM_CFLAGS)
 endif
-
-if VGCONF_OS_IS_LINUX
-cond_timedwait_invalid_LDADD = -lrt
-endif
-
index a8d0448d2fca799a6348d341f8068e1fae35b8e9..8c3bd8689473ca58bf501b1a07d58a41e2b68894 100644 (file)
@@ -1,4 +1,4 @@
-#include "config.h"
+
 #include <time.h>
 #include <pthread.h>
 #include <assert.h>
@@ -10,12 +10,12 @@ int main()
    pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
    pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
 
-#ifdef HAVE_CLOCK_GETTIME
-   assert(clock_gettime(CLOCK_REALTIME, &abstime)==0);
-#else
+
+
+
    abstime.tv_sec = time(NULL) + 2;
    abstime.tv_nsec = 0;
-#endif
+
    abstime.tv_nsec += 1000000000;
    
    assert(pthread_mutex_lock(&mutex)==0);