[Libguestfs] [PATCH v2 6/9] tests: Add tests using a captive daemon process.

Pino Toscano ptoscano at redhat.com
Mon Jun 29 17:11:56 UTC 2015


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;
 };

Thanks,
-- 
Pino Toscano




More information about the Libguestfs mailing list