On Mon, Jun 29, 2015 at 07:11:56PM +0200, Pino Toscano wrote:
In data giovedì 25 giugno 2015 15:56:58, Richard W.M. Jones ha
scritto:
> This allows us to test the daemon running as a host process, allowing
> us to meaningfully test it using valgrind.
>
> This commit only adds a single test that check that the daemon starts
> up, can be pinged, and exits.
> ---
> [...]> +sub run_tests {
> + my $g = Sys::Guestfs->new();
> + my $tmpdir = $g->get_tmpdir;
> + my $verbose = $g->get_verbose;
On this throw-away handle we could check whether the unix backend is
built in (unlike in RHEL, for example):
eval {
$g->set_backend ("unix:/idontexist");
};
if ($@) {
warn "$0: skipping test because the 'unix' backend not
available\n";
exit 77;
};
I'll likely patch this test out separately in downstream RHEL. Better
than adding hacks upstream - for instance it's plausible that a future
libguestfs would check if the socket exists in the set_backend call.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org