Hi Richard,

On Tue, Feb 04, 2025 at 04:07:31PM +0000, Richard Lewis wrote:
> However:
> 
> >
> > > (i was slightly wrong in my previous message, and i now think the
> > > issue is that the test assumes chkrootkit can see
> > > the network manager of the host, and this is apparently not the case
> > > in debusine. the new approach is more robust
> > > and hopefully makes debusine happy).
> >
> > This is not really about debusine. It is about autopkgtest in general.
> > If you happen to set up an autopkgtest image that happens to not use
> > ifupdown/dhclient (which presently is the default), but uses
> > systemd-networkd instead, you may locally reproduce the issue.
> 
> 
> i tried to confirm this and it does not seem to be the case. I started with
> the chkrootkit version that failed in debusine. i did an sbuild and made it
> run the rests in lxc --  it passes, but lxc is using dhclient.
> 
>  i then added "exit 1" to the test and used
>  --shell-fail so i got a shell in lxc
> 
> this seems to be broken (
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1073927) but, bizarrely,
> if you a suspend (Ctrl-z) and then resume (fg) it works. Then you can do:
> 
> apt purge purge isc-dhcp-client
> systemctl stop networking.service
> 
> cat > /etc/systemd/network/eth.network <<EOF
> 
> [Match]
> Name=eth*
> 
> [Network]
> DHCP=ipv4
> EOF
> 
> systemctl daemon-reload
> systemctl start systemd-networkd
> networkctl # shows it is working
> 
> sed -i 's/^exit 1/####/' debian/tests/test-chkrootkit
> 
> debian/tests/test-chkrootkit # still passes.

Is that the original test or the updated test that passes?

> so i still think there is something different about how debusine presents
> the interfaces from the host. Or something else i dont understand
> 
> (it might also have to do with /proc, possibly, but i wonder what "ip link
> show" in a test running in debusine shows?)
> 
> (a shorter testcase would be to just run "chkrootkit sniffer" since that is
> what causes the failure)

As far as I understand it, the original test expects the sniffer check
to find a sniffer (expecting e.g. dhclient), but when running networkd,
it does not actually find one and therefore fails. Is this understanding
correct? Possibly, the debusine environment runs in an ipv6-only
environment and there chkrootkit could be incapable of locating a
sniffer? Would that be plausible?

I generally agree that it should be easier to replicate the test
environment that debusine creates. It is not presently well defined.
Given that your updated test now succeeds on debusine, do you think we
might skip investigating this for now and call your solution good
enough?

Helmut

Reply via email to