|
From: Nicholas N. <nj...@ca...> - 2003-11-06 11:35:29
|
CVS commit by nethercote:
Filter out line numbers in vg_scheduler.c in Helgrind's regtests.
M +2 -2 deadlock.stderr.exp 1.3
M +3 -0 filter_stderr 1.4
M +1 -1 race.stderr.exp 1.3
M +1 -1 race2.stderr.exp 1.3
--- valgrind/helgrind/tests/deadlock.stderr.exp #1.2:1.3
@@ -5,5 +5,5 @@
by 0x........: t2 (deadlock.c:20)
by 0x........: thread_wrapper (vg_libpthread.c:...)
- by 0x........: do__quit (vg_scheduler.c:1791)
+ by 0x........: do__quit (vg_scheduler.c:...)
while holding locks 0x........(m2)
0x........(m2) last locked at
@@ -11,5 +11,5 @@
by 0x........: t2 (deadlock.c:19)
by 0x........: thread_wrapper (vg_libpthread.c:...)
- by 0x........: do__quit (vg_scheduler.c:1791)
+ by 0x........: do__quit (vg_scheduler.c:...)
while depending on locks 0x........(m1)
--- valgrind/helgrind/tests/filter_stderr #1.3:1.4
@@ -11,4 +11,7 @@
sed "s/section of \/.*helgrind\/tests.*$/section of \/...helgrind\/tests.../" |
+# Anonymise line numbers in vg_scheduler.c
+sed "s/vg_scheduler.c:[0-9]\+/vg_scheduler.c:.../" |
+
# Output looks like...
#
--- valgrind/helgrind/tests/race.stderr.exp #1.2:1.3
@@ -4,5 +4,5 @@
at 0x........: th (race.c:10)
by 0x........: thread_wrapper (vg_libpthread.c:...)
- by 0x........: do__quit (vg_scheduler.c:1791)
+ by 0x........: do__quit (vg_scheduler.c:...)
Address 0x........ is in BSS section of /...helgrind/tests...
Previous state: shared RO, no locks
--- valgrind/helgrind/tests/race2.stderr.exp #1.2:1.3
@@ -4,5 +4,5 @@
at 0x........: th (race2.c:17)
by 0x........: thread_wrapper (vg_libpthread.c:...)
- by 0x........: do__quit (vg_scheduler.c:1791)
+ by 0x........: do__quit (vg_scheduler.c:...)
Address 0x........ == &(f->poot[5].plop[11]) at race2.c:17
Previous state: shared RO, no locks
|
|
From: Nicholas N. <nj...@ca...> - 2004-04-16 07:23:09
|
CVS commit by nethercote: Make that damn 'inherit' test stop failing, even if Helgrind isn't doing the right thing. M +6 -6 inherit.c 1.2 M +2 -1 inherit.stderr.exp 1.4 --- valgrind/helgrind/tests/inherit.c #1.1:1.2 @@ -1,4 +1,10 @@ /* test child thread inheriting data */ +// *** +// +// Helgrind should detect an error on line 48 for this test, but it doesn't! +// +// *** + #include <pthread.h> #include <unistd.h> --- valgrind/helgrind/tests/inherit.stderr.exp #1.3:1.4 @@ -1 +1,2 @@ -XXX We expect an error on inherit.c:48 + + |
|
From: Nicholas N. <nj...@ca...> - 2004-09-13 20:51:17
|
CVS commit by nethercote:
All newlines are borked; fix.
M +43 -1 deadlock.c 1.2
--- valgrind/helgrind/tests/deadlock.c #1.1:1.2
@@ -1 +1,43 @@
-/* Simple possible deadlock */
#include <pthread.h>
static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
static void *t1(void *v)
{
pthread_mutex_lock(&m1);
pthread_mutex_lock(&m2);
pthread_mutex_unlock(&m1);
pthread_mutex_unlock(&m2);
return 0;
}
static void *t2(void *v)
{
pthread_mutex_lock(&m2);
pthread_mutex_lock(&m1);
pthread_mutex_unlock(&m1);
pthread_mutex_unlock(&m2);
return 0;
}
int main()
{
pthread_t a, b;
/* prevent spurious messages from the dynamic linker */
pthread_mutex_lock(&m1);
pthread_mutex_unlock(&m1);
pthread_create(&a, NULL, t1, NULL);
pthread_create(&b, NULL, t2, NULL);
pthread_join(a, NULL);
pthread_join(b, NULL);
return 0;
}
\ No newline at end of file
+/* Simple possible deadlock */
+#include <pthread.h>
+
+static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
+
+static void *t1(void *v)
+{
+ pthread_mutex_lock(&m1);
+ pthread_mutex_lock(&m2);
+ pthread_mutex_unlock(&m1);
+ pthread_mutex_unlock(&m2);
+
+ return 0;
+}
+
+static void *t2(void *v)
+{
+ pthread_mutex_lock(&m2);
+ pthread_mutex_lock(&m1);
+ pthread_mutex_unlock(&m1);
+ pthread_mutex_unlock(&m2);
+
+ return 0;
+}
+
+int main()
+{
+ pthread_t a, b;
+
+ /* prevent spurious messages from the dynamic linker */
+ pthread_mutex_lock(&m1);
+ pthread_mutex_unlock(&m1);
+
+ pthread_create(&a, NULL, t1, NULL);
+ pthread_create(&b, NULL, t2, NULL);
+
+ pthread_join(a, NULL);
+ pthread_join(b, NULL);
+
+ return 0;
+}
+
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-13 14:58:07
|
CVS commit by nethercote: Allow for test output files. M +4 -6 .cvsignore 1.4 --- valgrind/helgrind/tests/.cvsignore #1.3:1.4 @@ -2,13 +2,11 @@ Makefile allok -allok.stderr.diff -allok.stderr.out deadlock -deadlock.stderr.out -deadlock.stdout.out inherit race race2 readshared -inherit.stderr.diff -inherit.stderr.out +*.stdout.diff +*.stderr.diff +*.stdout.out +*.stderr.out |