]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Adding new exp file for tc18_semabuse in helgrind.
authorPetar Jovanovic <mips32r2@gmail.com>
Sat, 15 Sep 2012 02:36:21 +0000 (02:36 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Sat, 15 Sep 2012 02:36:21 +0000 (02:36 +0000)
The existing tc18_semabuse.stderr.exp expects that sem_post on a bogus semaphore
will fail, yet it does not on platforms such as MIPS or ARM. This is specific to
implementation of sem_post for i386/x86_64 that has some assumptions such as that
'private' field is not clobbered. This will eventually result in different
parameter passed to syscall and thus different output is encountered.
This change fixes helgrind/tests/tc18_semabuse for MIPS.

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

helgrind/tests/Makefile.am
helgrind/tests/tc18_semabuse.stderr.exp-linux-mips32 [new file with mode: 0644]

index 77c17f55cea471957ae9af292ef4d29916459403..02c16bafc40e438ede2fb312c677a5b5395ef836 100644 (file)
@@ -80,6 +80,7 @@ EXTRA_DIST = \
                tc17_sembar.stderr.exp \
        tc18_semabuse.vgtest tc18_semabuse.stdout.exp \
                tc18_semabuse.stderr.exp \
+               tc18_semabuse.stderr.exp-linux-mips32 \
        tc19_shadowmem.vgtest tc19_shadowmem.stdout.exp \
                tc19_shadowmem.stderr.exp \
        tc20_verifywrap.vgtest tc20_verifywrap.stdout.exp \
diff --git a/helgrind/tests/tc18_semabuse.stderr.exp-linux-mips32 b/helgrind/tests/tc18_semabuse.stderr.exp-linux-mips32
new file mode 100644 (file)
index 0000000..fd44e07
--- /dev/null
@@ -0,0 +1,22 @@
+
+---Thread-Announcement------------------------------------------
+
+Thread #x is the program's root thread
+
+----------------------------------------------------------------
+
+Thread #x's call to sem_init failed
+   with error code 22 (EINVAL: Invalid argument)
+   at 0x........: sem_init_WRK (hg_intercepts.c:...)
+   by 0x........: sem_init@* (hg_intercepts.c:...)
+   by 0x........: main (tc18_semabuse.c:23)
+
+----------------------------------------------------------------
+
+Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post
+   at 0x........: sem_wait_WRK (hg_intercepts.c:...)
+   by 0x........: sem_wait (hg_intercepts.c:...)
+   by 0x........: main (tc18_semabuse.c:34)
+
+
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)