Bug#800845: autopkgtest: Add support for nested VMs

Christian Seiler christian at iwakd.de
Sun Oct 4 18:15:57 UTC 2015


Hi,

just an additional note:

with these changes, I've successfully managed to write autopkgtests for
open-iscsi that do the following (not pushed to git yet because I need
to know whether you'll accept this patch):

debian/tests/control:
Tests: simple
Restrictions: needs-root, breaks-testbed, isolation-machine, needs-qcow2-baseimage, allow-stderr
Depends: targetcli, qemu-system, qemu-utils, autopkgtest, python3, python3-netifaces

debian/tests/simple:
  - sets up iSCSI target in test env
  - runs adt-run with adt-virt-qemu with the ADT_QCOW2_BASEIMAGE (in
    this case /dev/vdb) to run the tests for open-iscsi in a nested
    VM (using --override-control debian/tests/nested/control);
    also sets --env ISCSI_TARGET_IP=... etc. for the nested test

debian/tests/nested/control:
Tests: install, login, sysvinit-login
Tests-Directory: debian/tests/nested
Restrictions: needs-root, isolation-machine, breaks-testbed
Depends: open-iscsi

debian/tests/nested/$testname:
  - tests the iSCSI initiator (client) by connecting to
    ISCSI_TARGET_IP etc. and seeing if the kernel makes the right
    block devices available

So the patch I've posted here for autopkgtest is not just theoretical,
it actually works.

Regards,
Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20151004/a410ed66/attachment.sig>


More information about the autopkgtest-devel mailing list