]> git.saurik.com Git - bison.git/commitdiff
tests: update our Valgrind suppression files
authorAkim Demaille <akim@lrde.epita.fr>
Tue, 11 Aug 2015 14:42:04 +0000 (16:42 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Wed, 12 Aug 2015 11:56:06 +0000 (13:56 +0200)
* build-aux/linux-gnu.valgrind, build-aux/darwin11.4.0.valgrind: Rename as...
* build-aux/Linux.valgrind, build-aux/Darwin.valgrind: these.
* build-aux/Linux.valgrind: Add suppression clause.
* configure.ac: Update.
* tests/local.mk: Use it.

build-aux/Darwin.valgrind [new file with mode: 0644]
build-aux/Linux.valgrind [new file with mode: 0644]
build-aux/darwin11.4.0.valgrind [deleted file]
build-aux/linux-gnu.valgrind [deleted file]
build-aux/local.mk
configure.ac
tests/local.mk

diff --git a/build-aux/Darwin.valgrind b/build-aux/Darwin.valgrind
new file mode 100644 (file)
index 0000000..9b0b06f
--- /dev/null
@@ -0,0 +1,64 @@
+# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Valgrind suppression file for Bison.
+
+{
+   Mac OS X initialization
+   Memcheck:Leak
+   fun:?alloc*
+   ...
+   fun:*ImageLoader*
+}
+
+{
+   Mac OS X initialization
+   Memcheck:Leak
+   fun:?alloc*
+   ...
+   fun:*dyld*
+}
+
+{
+   Mac OS X initialization
+   Memcheck:Leak
+   fun:?alloc*
+   ...
+   fun:__CFInitialize
+}
+
+{
+   Mac OS X I/O buffer
+   Memcheck:Leak
+   fun:malloc
+   fun:__smakebuf
+   fun:__swsetup
+   fun:__sfvwrite
+   fun:fwrite
+}
+
+{
+   Mac OS X I/O buffer
+   Memcheck:Leak
+   fun:malloc
+   fun:__smakebuf
+   fun:__swsetup
+   fun:__swbuf
+   fun:putchar
+}
+
+# Local Variables:
+# mode: shell-script
+# End:
diff --git a/build-aux/Linux.valgrind b/build-aux/Linux.valgrind
new file mode 100644 (file)
index 0000000..d9c9667
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Valgrind suppression file for Bison.
+
+# Linux prague 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:30:32 UTC 2015
+# x86_64 GNU/Linux
+{
+   Probably exception handling from G++ 5.1.
+   Memcheck:Leak
+   match-leak-kinds: reachable
+   fun:malloc
+   fun:pool
+   fun:__static_initialization_and_destruction_0
+   fun:_GLOBAL__sub_I_eh_alloc.cc
+   fun:call_init.part.0
+   fun:_dl_init
+   obj:/usr/lib/ld-2.21.so
+}
+
+# Linux seattle 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012
+# x86_64 GNU/Linux
+{
+   index
+   Memcheck:Cond
+   fun:index
+   fun:expand_dynamic_string_token
+   fun:_dl_map_object
+   fun:map_doit
+   fun:_dl_catch_error
+   fun:do_preload
+   fun:dl_main
+   fun:_dl_sysdep_start
+   fun:_dl_start
+   obj:/lib/ld-2.11.3.so
+}
diff --git a/build-aux/darwin11.4.0.valgrind b/build-aux/darwin11.4.0.valgrind
deleted file mode 100644 (file)
index 9b0b06f..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Valgrind suppression file for Bison.
-
-{
-   Mac OS X initialization
-   Memcheck:Leak
-   fun:?alloc*
-   ...
-   fun:*ImageLoader*
-}
-
-{
-   Mac OS X initialization
-   Memcheck:Leak
-   fun:?alloc*
-   ...
-   fun:*dyld*
-}
-
-{
-   Mac OS X initialization
-   Memcheck:Leak
-   fun:?alloc*
-   ...
-   fun:__CFInitialize
-}
-
-{
-   Mac OS X I/O buffer
-   Memcheck:Leak
-   fun:malloc
-   fun:__smakebuf
-   fun:__swsetup
-   fun:__sfvwrite
-   fun:fwrite
-}
-
-{
-   Mac OS X I/O buffer
-   Memcheck:Leak
-   fun:malloc
-   fun:__smakebuf
-   fun:__swsetup
-   fun:__swbuf
-   fun:putchar
-}
-
-# Local Variables:
-# mode: shell-script
-# End:
diff --git a/build-aux/linux-gnu.valgrind b/build-aux/linux-gnu.valgrind
deleted file mode 100644 (file)
index 3130fbc..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# Linux seattle 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012
-# x86_64 GNU/Linux
-{
-   index
-   Memcheck:Cond
-   fun:index
-   fun:expand_dynamic_string_token
-   fun:_dl_map_object
-   fun:map_doit
-   fun:_dl_catch_error
-   fun:do_preload
-   fun:dl_main
-   fun:_dl_sysdep_start
-   fun:_dl_start
-   obj:/lib/ld-2.11.3.so
-}
index 7d752c860a254042ff4b0389571577c479b5a621..23a68c821eaae84074043c06bec1f220f11c7182 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-EXTRA_DIST +=                                   \
-  build-aux/cross-options.pl                    \
-  build-aux/darwin11.4.0.valgrind               \
-  build-aux/linux-gnu.valgrind                  \
-  build-aux/move-if-change                      \
-  build-aux/prev-version.txt                    \
+EXTRA_DIST +=                                  \
+  build-aux/Darwin.valgrind                    \
+  build-aux/Linux.valgrind                     \
+  build-aux/cross-options.pl                   \
+  build-aux/move-if-change                     \
+  build-aux/prev-version.txt                   \
   build-aux/update-b4-copyright
index 6f20040053f27c971e345b44b220e442118f9acd..35de4ceedffd605a311628131a044c6f68edcfa1 100644 (file)
@@ -220,20 +220,21 @@ AC_CONFIG_FILES([etc/bench.pl], [chmod +x etc/bench.pl])
 AC_CONFIG_TESTDIR(tests)
 AC_CONFIG_FILES([tests/atlocal])
 AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
+
 AC_CHECK_PROGS([VALGRIND], [valgrind])
-case $VALGRIND:$host_os in
+# Use something simpler that $host_os to select our suppression file.
+uname=`uname`
+case $VALGRIND:$uname in
   '':*) ;;
-  *:darwin*)
+  *:Darwin)
     # See README-hacking.
-    # VALGRIND+='-q --suppressions=$(abs_top_srcdir)/build-aux/darwin11.4.0.valgrind'
     VALGRIND=;;
   *:*)
-    suppfile=build-aux/$host_os.valgrind
+    suppfile=build-aux/$uname.valgrind
     if test -f "$srcdir/$suppfile"; then
-      VALGRIND="$VALGRIND --gen-suppressions=all"
-      VALGRIND="$VALGRIND --suppressions=\$(abs_top_srcdir)/$suppfile"
+      AC_SUBST([VALGRIND_OPTS_SUPPRESSION],
+               ["--suppressions=\$(abs_top_srcdir)/$suppfile"])
     fi
-    AC_SUBST([VALGRIND_PREBISON], ["$VALGRIND -q"])
     ;;
 esac
 
index 0fa6947a00d77dc82c1dba041b6a279806503d1c..0a3a46b9d4f455aaf896ef90016080635d7f2381 100644 (file)
@@ -108,11 +108,13 @@ maintainer-check-posix: $(RUN_TESTSUITE_deps)
        $(RUN_TESTSUITE) POSIXLY_CORRECT=1 _POSIX2_VERSION=200112
 
 .PHONY: maintainer-check-valgrind
+VALGRIND_OPTS = --leak-check=full --show-reachable=yes --gen-suppressions=all \
+  $(VALGRIND_OPTS_SUPPRESSION)
 maintainer-check-valgrind: $(RUN_TESTSUITE_deps)
-       test -z '$(VALGRIND)' ||                                        \
+       test 'x$(VALGRIND)' != x ||                                     \
          $(RUN_TESTSUITE)                                              \
-           PREBISON='$(VALGRIND_PREBISON)' PREPARSER='$(VALGRIND) -q'  \
-           VALGRIND_OPTS='--leak-check=full --show-reachable=yes'
+           PREBISON='$(VALGRIND) -q' PREPARSER='$(VALGRIND) -q'        \
+           VALGRIND_OPTS="$(VALGRIND_OPTS)"
 
 .PHONY: maintainer-check
 maintainer-check: maintainer-check-posix maintainer-check-valgrind maintainer-check-g++