[pkg-lxc-devel] Bug#958407: lxc-tests: Allow lxc as an autopkgtest backend

Antonio Terceiro terceiro at debian.org
Tue May 26 00:09:30 BST 2020


On Mon, May 25, 2020 at 07:35:30PM -0300, Antonio Terceiro wrote:
> On Mon, May 25, 2020 at 09:22:52PM +0200, Pierre-Elliott Bécue wrote:
> > Le mercredi 22 avril 2020 à 00:08:37+0900, Ryutaroh Matsumoto a écrit :
> > > Package: lxc-tests
> > > Version: 1:4.0.2-1~1
> > > Severity: wishlist
> > > 
> > > Dear Maintainer,
> > > 
> > > Only qemu-kvm is allowed as an autopkgtest backend of LXC, as
> > > debian/tests/control has the following line:
> > > Restrictions: needs-root allow-stderr isolation-machine
> > > 
> > > On the other hand, debian/tests/control skips tests that cannot
> > > be executed in a container as
> > > 
> > >     # Skip some tests when running in a container
> > >     if [ -f /run/container_type ] || (type systemd-detect-virt >/dev/null 2>&1 && systemd-detect-virt  --container >/dev/null 2>&1); then
> > >         [ "$testbin" = "/usr/bin/lxc-test-apparmor" ] && \
> > >             ignore "$STRING" && continue
> > > 
> > >         [ "$testbin" = "/usr/bin/lxc-test-device-add-remove" ] && \
> > >             ignore "$STRING" && continue
> > > 
> > >         [ "$testbin" = "/usr/bin/lxc-test-reboot" ] && \
> > >             ignore "$STRING" && continue
> > >     fi
> > > 
> > > So, please consider to allow lxc as an autopkgtest backend of lxc itself.
> > 
> > The more tests autopkgtest runs the better. If I put isolation-container
> > instead of isolation-machine, the tests would be allowed to run in
> > either a VM or a container, which could mean running less tests.
> 
> I think you have your reasoning backwards. isolation-container runs in
> both containers and vms; isolation-machine runs only on vms; so
> isolation-container tests runs on *more* environments, not less.
> 
> e.g. ci.debian.net uses containers, so tests marked as isolation-machine
> are skipped there.

I think I now understand your point: if you allow to run in containers,
it will run less tests.

what you can do is have two test declarations of the same test in the
control file: one with isolation-container and another with
isolation-machine (and maybe skip the one with isolation-container if
running in a vm)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-lxc-devel/attachments/20200525/356f35fd/attachment.sig>


More information about the Pkg-lxc-devel mailing list