Commit Graph

9 Commits

Author SHA1 Message Date
Pino Toscano
8335af37fa tests: do not assume '.' is in Perl's @INC
Upstream Perl is going to remove '.' from @INC (the include path for
modules) by default for the next major release (= 5.26) [1], as measure
to fix security issues.  Debian already started backporting the fixes
for this [2], thus behaving this way in current Sid installations.

Since the affected Perl sources are only the local daemon testing
scripts, a simple fix is to force the 'requires' for the local
captive-daemon.pm module to start from the current directory: this way
there is no need to manually augment @INC, and only our local module is
loaded automatically.

[1] https://rt.perl.org/Public/Bug/Display.html?id=127810
[2] https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html
2016-09-09 14:42:05 +02:00
Richard W.M. Jones
dd7be596f5 tests: Remove bogus use of $(VG). 2016-02-22 17:55:13 +00:00
Pino Toscano
d98c9c0e0b Fix shebang in perl scripts
Instead of hardcoding the location of perl (assuming it is installed in
/usr), use /usr/bin/env to run it, and thus picking it from $PATH.
This makes it possible to run these scripts also on installations with
perl in a different prefix than /usr.

Also, given that we want enable warnings on scripts, turn the -w
previously in shebang to explicit "use warnings;" in scripts which
didn't have it before.
2015-10-05 15:43:35 +02:00
Pino Toscano
7c470c1179 tests: fix string comparison
Use 'eq' for comparing strings instead of '=='.
2015-07-21 11:13:45 +02:00
Chen Hanxiao
98e1e9bcc2 tests: fix two minor warnings
"my" variable $output masks earlier declaration in same scope at /home/libguestfs/tests/daemon/test-btrfs.pl line 66.
"my" variable @r masks earlier declaration in same scope at /home/libguestfs/tests/daemon/test-btrfs.pl line 72.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-06-30 11:08:32 +01:00
Richard W.M. Jones
93cf45cadf tests: Add a test of btrfs-qgroup-show using the captive daemon. 2015-06-29 23:08:47 +01:00
Richard W.M. Jones
336b8f6b16 tests: Add a test of btrfs-subvolume-list using the captive daemon. 2015-06-29 23:08:47 +01:00
Richard W.M. Jones
f2438b75a2 tests: daemon: Cleanly shut down the daemon on exit.
This refines the previous commit by shutting down the daemon cleanly
at the end of the test (assuming the test was successful).  It
repurposes the 'internal_exit' API for this, which was previously used
by the now defunct --enable-valgrind-daemon functionality.
2015-06-29 23:08:46 +01:00
Richard W.M. Jones
9f85477cba tests: Add tests using a captive daemon process.
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.
2015-06-29 23:08:46 +01:00