mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
appliance: Enhance --enable-valgrind-daemon with a suppressions file.
This lets us suppress errors in system libraries.
This commit is contained in:
@@ -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 $@
|
||||
|
||||
19
appliance/guestfsd.suppressions
Normal file
19
appliance/guestfsd.suppressions
Normal file
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user