Hi Simon,

On Mon, Jul 08, 2024 at 07:15:43PM +0200, Simon Josefsson wrote:
> Erik Auerswald <auers...@unix-ag.uni-kl.de> writes:
> > On Mon, Jul 01, 2024 at 12:31:37PM -0700, Collin Funk wrote:
> >> Erik Auerswald <auers...@unix-ag.uni-kl.de> writes:
> >> 
> >> > Have you looked if you could add a (regression) test for this?
> >> >
> >> > Hm, the ping tests are skipped for me because they need to be run as
> >> > root.
> >> 
> >> Not specifically for this case. […]
> >
> > It seems as if the ping tests actually run in Simon's GitLab-based CI,
> > and they did not catch the problems, I think.
> 
> Those run as root though.

After my recent push to the inetutils git repo, one GitLab CI job failed,
because it could not resolve an IP address for "mirrorlist.centos.org":
CentOS7-libidn, <https://gitlab.com/gsasl/inetutils/-/jobs/7321035248>.

Another was listed as successful, but it did not actually finish the build
(it failed to build the telnet client):
ArchLinux, <https://gitlab.com/gsasl/inetutils/-/jobs/7321035247>

```
gcc -DHAVE_CONFIG_H -I. -I../../telnet -I..  -DTERMCAP -DLINEMODE 
-DKLUDGELINEMODE -DENV_HACK  -I../../lib -I../lib -I../../libinetutils -I../..  
   -g -O2 -MT telnet.o -MD -MP -MF .deps/telnet.Tpo -c -o telnet.o 
../../telnet/telnet.c
../../telnet/telnet.c: In function 'init_term':
../../telnet/telnet.c:767:9: error: implicit declaration of function 'tgetent'; 
did you mean 'getenv'? [-Wimplicit-function-declaration]
  767 |   err = tgetent (termbuf, tname);
      |         ^~~~~~~
      |         getenv
make[2]: Leaving directory 
'/builds/gsasl/inetutils/inetutils-2.5.36-d4dd/b/telnet'
make[2]: *** [Makefile:2053: telnet.o] Error 1
make[1]: Leaving directory '/builds/gsasl/inetutils/inetutils-2.5.36-d4dd/b'
make[1]: *** [Makefile:2045: check-recursive] Error 1
make: *** [Makefile:2344: check] Error 2
```

> On Debian-like systems, the net-tools and procps packages results in
> better testing coverage.

Thanks, I was not aware that installing the "procps" package also
increases test coverage, perhaps because I usually have it installed.

I have started looking into using "ss" from iproute2 or "lsof" instead
of a missing "netstat".  Both seem to provide the required functionality.
The "lsof" program seems to require root privileges for this, though.

The output of "ss -anO" seems to be close enough to that of "netstat -an",
at least on Ubuntu GNU/Linux, that this could work as a fallback.

I still need to think about how such a fallback could be added to the
test suite.

Br,
Erik

  • ping, ping6... Collin Funk
    • Re: pi... Erik Auerswald
      • Re... Collin Funk
        • ... Erik Auerswald
          • ... Simon Josefsson via Bug reports for the GNU Internet utilities
            • ... Erik Auerswald
              • ... Simon Josefsson via Bug reports for the GNU Internet utilities
              • ... Simon Josefsson via Bug reports for the GNU Internet utilities
                • ... Collin Funk

Reply via email to