Add testcase from BZ #324149 which was forgotten in r13641.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14168 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am
index d06043e..79dc945 100644
--- a/helgrind/tests/Makefile.am
+++ b/helgrind/tests/Makefile.am
@@ -15,6 +15,8 @@
 	cond_init_destroy.vgtest cond_init_destroy.stderr.exp \
 	cond_timedwait_invalid.vgtest cond_timedwait_invalid.stdout.exp \
 		cond_timedwait_invalid.stderr.exp \
+	cond_timedwait_test.vgtest cond_timedwait_test.stdout.exp \
+		cond_timedwait_test.stderr.exp \
 	bar_bad.vgtest bar_bad.stdout.exp bar_bad.stderr.exp \
 	bar_trivial.vgtest bar_trivial.stdout.exp bar_trivial.stderr.exp \
 	free_is_write.vgtest free_is_write.stdout.exp \
@@ -108,6 +110,7 @@
 	annotate_hbefore \
 	cond_init_destroy \
 	cond_timedwait_invalid \
+	cond_timedwait_test \
 	free_is_write \
 	hg01_all_ok \
 	hg02_deadlock \
diff --git a/helgrind/tests/cond_timedwait_test.c b/helgrind/tests/cond_timedwait_test.c
new file mode 100644
index 0000000..e9b9be8
--- /dev/null
+++ b/helgrind/tests/cond_timedwait_test.c
@@ -0,0 +1,20 @@
+#include <pthread.h>
+#include <string.h>
+
+int main() {
+  pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+  pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
+
+  // This time has most definitely passed already. (Epoch)
+  struct timespec now;
+  memset(&now, 0, sizeof(now));
+
+  pthread_mutex_lock(&mutex);
+  pthread_cond_timedwait(&cond, &mutex, &now);
+  pthread_mutex_unlock(&mutex);
+
+  pthread_mutex_destroy(&mutex);
+  pthread_cond_destroy(&cond);
+
+  return 0;
+}
diff --git a/helgrind/tests/cond_timedwait_test.stderr.exp b/helgrind/tests/cond_timedwait_test.stderr.exp
new file mode 100644
index 0000000..d18786f
--- /dev/null
+++ b/helgrind/tests/cond_timedwait_test.stderr.exp
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/helgrind/tests/cond_timedwait_test.stdout.exp b/helgrind/tests/cond_timedwait_test.stdout.exp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/helgrind/tests/cond_timedwait_test.stdout.exp
diff --git a/helgrind/tests/cond_timedwait_test.vgtest b/helgrind/tests/cond_timedwait_test.vgtest
new file mode 100644
index 0000000..b2a3d71
--- /dev/null
+++ b/helgrind/tests/cond_timedwait_test.vgtest
@@ -0,0 +1 @@
+prog: cond_timedwait_test