[Libvir] PATCH: Supress valgrind errors in bash

The test cases which have a shell wrapper script generate a pile of memory leak warnings from valgrind due to various issues in bash itself. This disguises the real errors valgrind finds in libvirt. So this patch adds a surpressions file to hide the bash problems Regards, Daniel. Index: .valgrind.supp =================================================================== RCS file: .valgrind.supp diff -N .valgrind.supp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ .valgrind.supp 27 Apr 2008 19:41:14 -0000 @@ -0,0 +1,44 @@ +{ + bashMemoryLeak1 + Memcheck:Leak + fun:malloc + fun:xmalloc + fun:set_signal + fun:trap_builtin + obj:/bin/bash + obj:/bin/bash + fun:execute_command_internal + fun:parse_and_execute + obj:/bin/bash + fun:source_file + fun:source_builtin + obj:/bin/bash +} +{ + bashMemoryLeak2 + Memcheck:Leak + fun:malloc + fun:xmalloc + fun:make_command + fun:yyparse + fun:parse_command + fun:read_command + fun:reader_loop + fun:main +} +{ + bashMemoryLeak3 + Memcheck:Leak + fun:malloc + fun:xmalloc + obj:/bin/bash + fun:execute_command_internal + obj:/bin/bash + fun:execute_command_internal + fun:execute_command_internal + obj:/bin/bash + obj:/bin/bash + fun:execute_command_internal + fun:parse_and_execute + fun:command_substitute +} Index: Makefile.am =================================================================== RCS file: /data/cvs/libvirt/tests/Makefile.am,v retrieving revision 1.41 diff -u -p -r1.41 Makefile.am --- Makefile.am 18 Apr 2008 15:28:33 -0000 1.41 +++ Makefile.am 27 Apr 2008 19:41:14 -0000 @@ -73,7 +73,7 @@ TESTS_ENVIRONMENT = \ $(VG) valgrind: - $(MAKE) check VG="valgrind --quiet --leak-check=full" + $(MAKE) check VG="valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp" # Note: xmlrpc.[c|h] is not in libvirt yet xmlrpctest_SOURCES = \ -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Sun, Apr 27, 2008 at 08:46:41PM +0100, Daniel P. Berrange wrote:
The test cases which have a shell wrapper script generate a pile of memory leak warnings from valgrind due to various issues in bash itself. This disguises the real errors valgrind finds in libvirt. So this patch adds a surpressions file to hide the bash problems
Fine, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard