diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-01-24 13:47:25 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-01-24 15:56:14 +0000 |
commit | d08806adfc5d111b4b6c761540ff508d3f25b66e (patch) | |
tree | 58bcd51e9cd8e7a41a27b439dde83f34d765e4b7 /configure.ac | |
parent | b7122eaa58ccd153a8c39bc3b6f890755c5df089 (diff) | |
download | libguestfs-d08806adfc5d111b4b6c761540ff508d3f25b66e.tar.gz libguestfs-d08806adfc5d111b4b6c761540ff508d3f25b66e.tar.xz libguestfs-d08806adfc5d111b4b6c761540ff508d3f25b66e.zip |
Enable running the daemon under valgrind.
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3e364b12..ebc20aa7 100644 --- a/configure.ac +++ b/configure.ac @@ -264,8 +264,23 @@ if test "x$enable_daemon" = "xyes"; then [], [enable_install_daemon=no]) AC_MSG_RESULT([$enable_install_daemon]) + + dnl Enable valgrind in the daemon. + AC_MSG_CHECKING([if we should run the daemon under valgrind]) + AC_ARG_ENABLE([valgrind-daemon], + [AS_HELP_STRING([--enable-valgrind-daemon], + [run the daemon under valgrind (developers only) @<:@default=no@:>@])], + [], + [enable_valgrind_daemon=no]) + AC_MSG_RESULT([$enable_valgrind_daemon]) + + if test "x$enable_valgrind_daemon" = "xyes"; then + AC_DEFINE([VALGRIND_DAEMON],[1],[Define to 1 to run the daemon under valgrind]) + AC_DEFINE_UNQUOTED([VALGRIND_LOG_PATH],["$(pwd)"],[Path to save valgrind log files]) + fi fi AM_CONDITIONAL([INSTALL_DAEMON],[test "x$enable_install_daemon" = "xyes"]) +AM_CONDITIONAL([VALGRIND_DAEMON],[test "x$enable_valgrind_daemon" = "xyes"]) dnl Build the appliance? AC_MSG_CHECKING([if we should build the appliance]) |