[libvirt] [PATCH] tests: run valgrind on real executables, not libtool wrappers

* tests/Makefile.am (valgrind): Use libtool's ability to bypass libtool wrappers when running valgrind. --- I didn't think this was quite trivial enough to push without review. Now that tests use libtool, we want to be sure to run valgrind on the actual test, not on the bash shell that libtool uses to fire up the real test. I also tested that this works even when there is no libtool wrapper, such as when you disable modules for compilation. tests/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index c7addde..24818b1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -244,7 +244,7 @@ TESTS_ENVIRONMENT = \ valgrind: - $(MAKE) check VG="valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp" + $(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp" sockettest_SOURCES = \ sockettest.c \ -- 1.7.7.6

On 05/25/2012 10:48 AM, Eric Blake wrote:
* tests/Makefile.am (valgrind): Use libtool's ability to bypass libtool wrappers when running valgrind. ---
I didn't think this was quite trivial enough to push without review. Now that tests use libtool, we want to be sure to run valgrind on the actual test, not on the bash shell that libtool uses to fire up the real test. I also tested that this works even when there is no libtool wrapper, such as when you disable modules for compilation. I just found the issue, 'make -C test valgrind' doesn't work for me. tests/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am index c7addde..24818b1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -244,7 +244,7 @@ TESTS_ENVIRONMENT = \
valgrind: - $(MAKE) check VG="valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp" + $(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full It works well for me with your patch. --suppressions=$(srcdir)/.valgrind.supp"
sockettest_SOURCES = \ sockettest.c \

On 05/24/2012 09:12 PM, Alex Jia wrote:
On 05/25/2012 10:48 AM, Eric Blake wrote:
* tests/Makefile.am (valgrind): Use libtool's ability to bypass libtool wrappers when running valgrind. ---
I didn't think this was quite trivial enough to push without review. Now that tests use libtool, we want to be sure to run valgrind on the actual test, not on the bash shell that libtool uses to fire up the real test. I also tested that this works even when there is no libtool wrapper, such as when you disable modules for compilation. I just found the issue, 'make -C test valgrind' doesn't work for me. tests/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am index c7addde..24818b1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -244,7 +244,7 @@ TESTS_ENVIRONMENT = \
valgrind: - $(MAKE) check VG="valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp" + $(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full It works well for me with your patch.
Thanks; pushed. (And yes, if you look at the commit date of 24 Nov 2010, I really _did_ discover this issue and solution that long ago, but didn't have any reason to post it until we finally switched to modules by default). -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Thu, May 24, 2012 at 08:48:17PM -0600, Eric Blake wrote:
* tests/Makefile.am (valgrind): Use libtool's ability to bypass libtool wrappers when running valgrind. ---
I didn't think this was quite trivial enough to push without review. Now that tests use libtool, we want to be sure to run valgrind on the actual test, not on the bash shell that libtool uses to fire up the real test. I also tested that this works even when there is no libtool wrapper, such as when you disable modules for compilation.
tests/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am index c7addde..24818b1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -244,7 +244,7 @@ TESTS_ENVIRONMENT = \
valgrind: - $(MAKE) check VG="valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp" + $(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp"
sockettest_SOURCES = \ sockettest.c \
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Alex Jia
-
Daniel P. Berrange
-
Eric Blake