summaryrefslogtreecommitdiffstats
path: root/appliance
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-14 16:13:40 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-03-14 16:13:40 +0000
commit302309921a8cde83eb19a7c25b7ee43932b91a05 (patch)
tree125c9fb45a92f46b4f9ef80e3fd74ff893e85b91 /appliance
parent5da61d30520315a7d5060137a6c109f2109a7631 (diff)
downloadlibguestfs-302309921a8cde83eb19a7c25b7ee43932b91a05.tar.gz
libguestfs-302309921a8cde83eb19a7c25b7ee43932b91a05.tar.xz
libguestfs-302309921a8cde83eb19a7c25b7ee43932b91a05.zip
appliance: Enhance --enable-valgrind-daemon with a suppressions file.
This lets us suppress errors in system libraries.
Diffstat (limited to 'appliance')
-rw-r--r--appliance/Makefile.am5
-rw-r--r--appliance/guestfsd.suppressions19
-rwxr-xr-xappliance/init5
3 files changed, 26 insertions, 3 deletions
diff --git a/appliance/Makefile.am b/appliance/Makefile.am
index 09a5d00d..6dbf5cce 100644
--- a/appliance/Makefile.am
+++ b/appliance/Makefile.am
@@ -64,12 +64,13 @@ stamp-supermin: make.sh packagelist excludelist
./make.sh
touch $@
-supermin.d/daemon.img: ../daemon/guestfsd
+supermin.d/daemon.img: ../daemon/guestfsd guestfsd.suppressions
mkdir -p supermin.d
rm -f $@ $@-t
rm -rf tmp
- mkdir -p tmp$(DAEMON_SUPERMIN_DIR)
+ mkdir -p tmp$(DAEMON_SUPERMIN_DIR) tmp/etc
ln ../daemon/guestfsd tmp$(DAEMON_SUPERMIN_DIR)/guestfsd
+ ln guestfsd.suppressions tmp/etc/guestfsd.suppressions
( cd tmp && find | cpio --quiet -o -H newc ) > $@-t
rm -rf tmp
mv $@-t $@
diff --git a/appliance/guestfsd.suppressions b/appliance/guestfsd.suppressions
new file mode 100644
index 00000000..cb050796
--- /dev/null
+++ b/appliance/guestfsd.suppressions
@@ -0,0 +1,19 @@
+# This file is only used when libguestfs is configured with
+#
+# ./configure --enable-valgrind-daemon
+#
+# (only used for development, and only used in the regular supermin
+# appliance, not libguestfs live).
+#
+# If there are any valgrind errors in the base libraries such as
+# glibc, then we can suppress them here, so we only see errors in
+# libguestfs daemon code.
+
+# libdl
+{
+ libdl_index_cond
+ Memcheck:Cond
+ fun:index
+ fun:expand_dynamic_string_token
+ fun:_dl_map_object
+}
diff --git a/appliance/init b/appliance/init
index 6dd75279..52e46655 100755
--- a/appliance/init
+++ b/appliance/init
@@ -116,8 +116,11 @@ if ! grep -sq guestfs_rescue=1 /proc/cmdline; then
# Run the daemon under valgrind if ./configure --enable-valgrind-daemon
vg_channel=/dev/virtio-ports/org.libguestfs.valgrind
if [ -w $vg_channel ]; then
+ if [ -r /etc/guestfsd.suppressions ]; then
+ suppressions="--suppressions=/etc/guestfsd.suppressions"
+ fi
exec 3>$vg_channel
- vg="valgrind --leak-check=full --log-fd=3 --error-exitcode=119 --max-stackframe=8388608 --child-silent-after-fork=yes"
+ vg="valgrind --leak-check=full --log-fd=3 --error-exitcode=119 --max-stackframe=8388608 --child-silent-after-fork=yes $suppressions"
echo "enabling valgrind: $vg"
fi