[Libguestfs] [PATCH] Enable running the daemon under valgrind.
Matthew Booth
mbooth at redhat.com
Tue Jan 24 15:13:09 UTC 2012
On 01/24/2012 01:52 PM, Richard W.M. Jones wrote:
> From: "Richard W.M. Jones"<rjones at redhat.com>
>
> This commit allows you to run the daemon under valgrind. You have to
> enable it at configure time:
>
> ./configure --enable-valgrind-daemon
>
> This should *not* be done for production builds.
>
> When this feature is enabled, valgrind is added to the appliance and
> the daemon is run under valgrind. Log messages from valgrind are
> passed back over a virtio-serial channel into a file called
> 'valgrind.log.$PID' in the top build directory.
>
> Running 'make check', 'make extra-tests' etc causes many
> valgrind.log.* files to be created which must be examined by hand.
> ---
> .gitignore | 1 +
> appliance/Makefile.am | 9 +++++++--
> appliance/init | 10 +++++++++-
> appliance/packagelist.in | 4 ++++
> configure.ac | 15 +++++++++++++++
> src/guestfs.c | 2 ++
> src/launch.c | 10 ++++++++++
> 7 files changed, 48 insertions(+), 3 deletions(-)
>
Could you stick a comment here explaining what this #ifdef is for? It's
not obvious enough from the code.
> +#ifndef VALGRIND_DAEMON
> /* Kill the qemu subprocess. */
> if (g->state != CONFIG)
> guestfs_kill_subprocess (g);
> +#endif
>
> /* Run user close callbacks. */
ACK.
Matt
--
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team
GPG ID: D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
More information about the Libguestfs
mailing list