On Wed, Jun 24, 2015 at 03:51:42PM +0200, Pino Toscano wrote:
+TESTS = \ + test-daemon-start.pl
Should this test be run only when valgrind is present?
It's possible to run the tests with or without valgrind. When testing without valgrind, you're testing that basic functionality (eg. the parsing of btrfs command output) works. With valgrind you're obviously testing that + that there are no memory errors. The tests run very quickly indeed -- subsecond -- because they don't run the appliance.
Or make captive-daemon.pm exit with 77 if VG is empty/not found?
Currently configure sets VG to some impossible value (VG_IS_NOT_INSTALLED IIRC) so any use of 'make check-valgrind' anywhere will fail with an obvious error messasge.
+sub run_tests { [...] + # Run the user tests. + my $r = ::tests ($g);
Minor detail: would it be possible to take as parameter of run_tests an array of function pointers? This way more tests can be called together, implementing them in different functions.
That's possible too. This isn't an external interface so we can change it around in future. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top