[Pkg-libvirt-commits] [libguestfs] 18/65: v2v: test-harness: Update the man page.

Hilko Bengen bengen at moszumanska.debian.org
Tue Apr 21 12:10:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit e264317b048987f725e6e63f4dd1bc1c21fca35f
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Apr 1 13:04:32 2015 +0100

    v2v: test-harness: Update the man page.
---
 v2v/test-harness/virt-v2v-test-harness.pod | 95 ++++++++++++++++++++++++++----
 1 file changed, 85 insertions(+), 10 deletions(-)

diff --git a/v2v/test-harness/virt-v2v-test-harness.pod b/v2v/test-harness/virt-v2v-test-harness.pod
index 4861687..afd090b 100644
--- a/v2v/test-harness/virt-v2v-test-harness.pod
+++ b/v2v/test-harness/virt-v2v-test-harness.pod
@@ -6,10 +6,10 @@ virt-v2v-test-harness - Used to test virt-v2v against real test cases
 
  open V2v_test_harness
  
- let test = "rhel45-i386-fv"
+ let test = "rhel_45_i386_fv"
  let test_plan = {
    default_plan with
-     boot_plan = Boot_to_screenshot (test ^ ".ppm")
+     boot_plan = Boot_to_screenshot (test ^ "-login.ppm")
  }
  
  let () = run ~test ~test_plan ()
@@ -43,12 +43,19 @@ The freely redistributable test cases can be downloaded from:
 I<B<Download location TBD>>
 
 The proprietary test cases are not made available to the public, for
-obvious licensing reasons.
+licensing reasons.  Red Hat associates may find them in Engineering Git.
 
 The test cases consist of disk images which are very large, from 250
 MB through to tens of gigabytes I<each>.  This means that distributing
 test cases can be very time-consuming and expensive.
 
+=head2 REQUIREMENTS
+
+It's recommended to use an idle machine for testing.  You will need
+B<a lot of disk space> to run the tests, in excess of S<100 GB>.  You
+should also ensure the test machine has plenty of RAM, at least
+S<16 GB>.
+
 =head2 RUNNING THE TEST CASES
 
 To run the test cases you must install the virt-v2v test harness (the
@@ -63,6 +70,27 @@ repository, do:
  make
  make check
 
+=head2 PARALLEL TESTS
+
+You can run test cases in parallel by doing:
+
+ make check -j<N>
+
+(eg. C<-j2> for running up to 2 tests in parallel).  Be careful about
+running too many parallel tests, as it can slow down each test enough
+to cause false failures.
+
+=head2 RUNNING TEST CASES AGAINST UPSTREAM VIRT-V2V
+
+Using C<make check> picks up whatever C<virt-v2v> binary is on your
+C<$PATH>.
+
+If you have compiled libguestfs from source and want to test that
+version of virt-v2v, use the libguestfs C<run> script (in the
+top-level build directory of the libguestfs sources).  eg:
+
+ ../libguestfs/run make check
+
 =head1 WRITING NEW TEST CASES
 
 If you are interested in writing test cases, it is suggested that you
@@ -73,6 +101,8 @@ Also you must install the virt-v2v test harness (the OCaml module:
 C<V2v_test_harness>, source in C<libguestfs.git/v2v/test-harness>).
 In Fedora, install the C<virt-v2v-test-harness> package.
 
+=head2 FILES IN EACH TEST CASE
+
 Each test case consists of:
 
 =over 4
@@ -82,6 +112,10 @@ Each test case consists of:
 The disk image of the virtual machine before conversion.  Usually this
 should be converted to raw format and xz-compressed.
 
+=item I<test>.ova
+
+Alternatively, an OVA, exported from VMware, may be used.
+
 =item I<test>.xml
 
 The libvirt XML used as input to virt-v2v.  See the discussion of
@@ -100,18 +134,24 @@ You can supply zero or one "final" screenshot.  This is often a
 screenshot of the login page which indicates that the guest booted
 successfully.
 
+The screenshots are captured using L<virsh(1)>.  Comparison of
+screenshots against the test images is done using the ImageMagick
+L<compare(1)> program.
+
 =item I<test>.ml
 
 The test itself - see below.
 
 =back
 
+=head2 WRITING THE TEST
+
 The test file (C<*.ml>) is used to control the test harness, and
 minimally it would look something like this:
 
  open V2v_test_harness
  
- let test = "short-name"
+ let test = "short_name"
  
  let () = run ~test ()
 
@@ -121,11 +161,11 @@ That would instruct the test harness to:
 
 =item *
 
-Uncompress C<I<short-name>.img.xz>
+Uncompress C<I<short_name>.img.xz>
 
 =item *
 
-Run C<virt-v2v -i libvirtxml I<short-name>.xml [...]>
+Run C<virt-v2v -i libvirtxml I<short_name>.xml [...]>
 
 =item *
 
@@ -140,7 +180,7 @@ page.  To do that you have to supply a C<~test_plan> parameter:
 
  open V2v_test_harness
  
- let test = "short-name"
+ let test = "short_name"
  let test_plan = {
    default_plan with
      boot_plan = Boot_to_screenshot (test ^ ".ppm")
@@ -154,11 +194,42 @@ that files have been created, modified or deleted as expected within
 the disk image.  See C<V2v_test_harness.mli> for more information on
 how to do that.
 
-=head1 FILES
+=head2 FILES GENERATED BY RUNNING THE TEST
 
-Note: To find the value of C<$ocamllibdir>, run:
+When you run each test, the following files can be created:
 
- ocamlc -where
+=over 4
+
+=item I<test>-I<yyyymmdd-hhmmss>.scrn
+
+Screenshot(s) of the guest's graphical console.  These are helpful
+when writing tests or debugging test failures.
+
+The screenshot format is Portable Pixmap (PPM).
+
+=item I<test>.img
+
+The uncompressed original disk image (before conversion).
+
+=item I<test>-converted-sda
+
+=item I<test>-converted.xml
+
+The result of conversion, ie. after running virt-v2v but before
+test-booting the guest.  See the L<virt-v2v(1)> manual page
+description of I<-o local>.
+
+The disk image format is qcow2.
+
+=item I<test>-booted-sda
+
+The disk image after test-booting.  This is a qcow2 file which uses
+the I<test>-converted-sda file as a backing disk, in order to save
+disk space.
+
+=back
+
+=head1 FILES
 
 =over 4
 
@@ -174,11 +245,15 @@ L<ocamlfind(1)>.
 
 =back
 
+NB: To find the value of C<$ocamllibdir>, run C<ocamlc -where>
+
 =head1 SEE ALSO
 
 L<virt-v2v(1)>,
 L<virt-p2v(1)>,
 L<guestfs(3)>,
+L<virsh(1)>,
+L<compare(1)>,
 L<http://libguestfs.org/>.
 
 =head1 AUTHORS

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list