[Libguestfs] [PATCH] v2v: Add extra tests for malformed OVA files.

Pino Toscano ptoscano at redhat.com
Tue Mar 7 12:05:48 UTC 2017


On Monday, 6 March 2017 16:08:59 CET Richard W.M. Jones wrote:
> Test:
>  - Bad SHA1 sum
>  - Bad SHA256 sum
>  - Invalid lines in manifest (x2)
>  - Good checksum and manifest
> 
> These tests were originally written by Tomáš Golembiovský.  All I have
> done is to integrate them into the virt-v2v test suite.
> ---
>  .gitignore                              |  1 +
>  v2v/Makefile.am                         | 22 +++++++-
>  v2v/test-v2v-i-ova-bad-sha1.sh          | 66 +++++++++++++++++++++++
>  v2v/test-v2v-i-ova-bad-sha256.sh        | 66 +++++++++++++++++++++++
>  v2v/test-v2v-i-ova-checksums.ovf        | 95 +++++++++++++++++++++++++++++++++
>  v2v/test-v2v-i-ova-good-checksums.sh    | 64 ++++++++++++++++++++++
>  v2v/test-v2v-i-ova-invalid-manifest1.sh | 65 ++++++++++++++++++++++
>  v2v/test-v2v-i-ova-invalid-manifest2.sh | 64 ++++++++++++++++++++++
>  8 files changed, 442 insertions(+), 1 deletion(-)
>  create mode 100755 v2v/test-v2v-i-ova-bad-sha1.sh
>  create mode 100755 v2v/test-v2v-i-ova-bad-sha256.sh
>  create mode 100644 v2v/test-v2v-i-ova-checksums.ovf
>  create mode 100755 v2v/test-v2v-i-ova-good-checksums.sh
>  create mode 100755 v2v/test-v2v-i-ova-invalid-manifest1.sh
>  create mode 100755 v2v/test-v2v-i-ova-invalid-manifest2.sh

test-v2v-i-ova-good-checksums.sh seems a bit reduntant though -- IMHO
it'd be better to:
- add checksumming of .ovf files to all the tests
- verify no warnings were issued in one of the existing ova tests

All the other tests LGTM.

Thanks,
-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170307/78ca9661/attachment.sig>


More information about the Libguestfs mailing list