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

Pierre-Elliott Bécue peb at debian.org
Tue May 26 11:23:04 BST 2020


Le lundi 25 mai 2020 à 20:09:30-0300, Antonio Terceiro a écrit :
> 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)

Hi Antonio,

Indeed, I'll think about that. If you're eager to take care of such a
solution, I'd be glad to leave that up to you! :)

Cheers!

-- 
Pierre-Elliott Bécue
GPG: 9AE0 4D98 6400 E3B6 7528  F493 0D44 2664 1949 74E2
It's far easier to fight for one's principles than to live up to them.
-------------- 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/20200526/8c0c0f30/attachment.sig>


More information about the Pkg-lxc-devel mailing list