Ian Jackson writes ("Re: Multi-host networking software, autopkgtests"):
> For now I'm working on an adhoc thing that uses
>   - Restrictions: needs-root
>   - overlayfs to make an editable clone of the fs provided by autopkgtest
>   - chroot
>   - ip netns
>   - apt-mark and apt-autoremove to get rid of unwanted deps
> 
> It's not particularly pretty but it's not much code and I feel I'm
> making progress.  I'll report back here when I've succeeded - or
> failed :-).

This worked very well on my laptop but it has been going quite badly
in the CI.  The CI environment is really quite different from the
real one (sometimes in what seem like strange ways).

Right now I am having the following impossible thing occurring. [1]
This code:

    tunfd= open("/dev/net/tun", O_RDWR);
    if (tunfd < 0) sysfatal("open /dev/net/tun");

    r= fcntl(tunfd, F_GETFD);
    if (r==-1) sysfatal("fcntl(tunfd,F_GETFD)");

is resulting in this output:

    2023-01-10T22:58:46.142075+00:00 ci-010-c4ebefae hippotatd[153]:
    error: ipif stderr: userv-ipif service: fatal system error:
    fcntl(tunfd,F_GETFD): Bad file descriptor

The executable which prints this message is not multithreaded and has
no signal handlers.  I suspect ? ? CI ? container ? hates tun ? ?,
or ? ? overlay fs on /dev ? strange effect on /dev/net/tun ? ?.

(Also in the test I have that *doesn't* do the pid namespace and
chroot thing, service(8) seems to have been disabled.  Maybe I need to
add a Restriction for that?)


I looked again at the links you helpfully provided.  That does look
like it would be doable, but it's decidedly nontrivial.

Each of those scripts has its own ad-hoc answer (or not) to questions
like "cope with the file:// apt urls not working" "map the Debian
architecture to a qemu binary" "configure the within-qemu environment
so we can do anything to it" "manage the lifetime of the qemu" etc.


I'm considering a third option: "disable the tests in debci" :-/.

Ian.

[1]
 Test script source code
   
https://browse.dgit.debian.org/hippotat.git/tree/adt/acommon?h=archive/debian/1.1.5%2bexp7
 Recent test log (full of distracting crap):
   
https://ci.debian.net/data/autopkgtest/unstable/amd64/h/hippotat/30238962/log.gz
 Source code for "ipif" program experiencing the EBADF error
   
https://browse.dgit.debian.org/userv-utils.git/tree/ipif/service.c?h=archive/debian/0.6.1-2#n711

-- 
Ian Jackson <ijack...@chiark.greenend.org.uk>   These opinions are my own.  

Pronouns: they/he.  If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.

Reply via email to