bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

valgrind-tests.m4 improvement (was: Re: libtasn1 2.11 pre-release)


From: Simon Josefsson
Subject: valgrind-tests.m4 improvement (was: Re: libtasn1 2.11 pre-release)
Date: Fri, 25 Nov 2011 00:23:56 +0100

Bruno Haible <address@hidden> writes:

> Hi Simon,
>
>> > * Linux/x86_64
>> >
>> > 8 of 8 tests failed
>> >
>> > The reason is that I have valgrind 3.5.0 installed, and "make
>> > check" apparently
>> > runs valgrind on many 'bash' processes, each leading to a
>> > failure. See attached
>> > log.
>> 
>> Can you try and run this for me on that system:
>> 
>> valgrind -q --error-exitcode=1 --leak-check=no /bin/bash -c 'exit 0'
>> echo $?
>
> It prints a lot of output to stderr and terminates with exit code 1.

Great.  I have pushed this fix to gnulib.

/Simon

>From 9a0d285c9735ed65be2c63ba0db2c9d864bf7407 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <address@hidden>
Date: Fri, 25 Nov 2011 00:20:17 +0100
Subject: [PATCH] valgrind-tests.m4: Avoid breakage if valgrind on bash fails.

* m4/valgrind-tests.m4: Check that the parameters that will be
used works, not just a subset of them.  Reported by Bruno Haible
<address@hidden>.
---
 ChangeLog            |    7 +++++++
 m4/valgrind-tests.m4 |    9 ++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fd82024..8dff9d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-11-25  Simon Josefsson  <address@hidden>
+
+       valgrind-tests.m4: Avoid breakage if valgrind on bash fails.
+       * m4/valgrind-tests.m4: Check that the parameters that will be
+       used works, not just a subset of them.  Reported by Bruno Haible
+       <address@hidden>.
+
 2011-11-24  Jim Meyering  <address@hidden>
 
        test-stdalign.c: comment out long double tests
diff --git a/m4/valgrind-tests.m4 b/m4/valgrind-tests.m4
index ab9e25a..0a2a9a8 100644
--- a/m4/valgrind-tests.m4
+++ b/m4/valgrind-tests.m4
@@ -1,4 +1,4 @@
-# valgrind-tests.m4 serial 2
+# valgrind-tests.m4 serial 3
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,9 +21,12 @@ AC_DEFUN([gl_VALGRIND_TESTS],
     AC_CHECK_PROGS(VALGRIND, valgrind)
   fi
 
-  if test -n "$VALGRIND" && $VALGRIND -q true > /dev/null 2>&1; then
+  OPTS="-q --error-exitcode=1 --leak-check=full"
+
+  if test -n "$VALGRIND" \
+     && $VALGRIND $OPTS $SHELL -c 'exit 0' > /dev/null 2>&1; then
     opt_valgrind_tests=yes
-    VALGRIND="$VALGRIND -q --error-exitcode=1 --leak-check=full"
+    VALGRIND="$VALGRIND $OPTS"
   else
     opt_valgrind_tests=no
     VALGRIND=
-- 
1.7.2.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]