Hi Erik,

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. Though I would like to improve overall
test suite so that it is easier to add tests. A lot of GNU projects copy
tests/init.sh from Gnulib which provides some basic functionality.
Coreutils would probably be a good reference for dealing with that and
tests requiring root [1].

Then also dealing with tests requiring daemons running.

>   1. It would be nice if "ping6" would attempt to fall back to
>      unprivileged ICMP, just as "ping" seems to do.  The code in
>      ping/libping.c seems to do the right thing, but I get an error
>      message pertaining to raw sockets instead of "ping6" successfully
>      falling back to an ICMP datagram socket:
[...]
>      The "fping" program works for me without privileges for both IPv4 and
>      IPv6 (with the exception of sending to an IPv6 multicast address), so
>      I would expect that "ping6" should generally be able to do this, too.

Yeah, I noticed this too. I would have to look into this more. Probably
just one of the small variations between 'ping' and 'ping6' that Simon
mentioned recently. :)

>   2. We could consider checking if the tests are running on a
>      system with a Linux kernel.  In that case, we could look at the
>      "net.ipv4.ping_group_range" system setting, and check if any of
>      the test process's groups are allowed to use unprivileged ICMP.
>      If this is also true, then we could at least run the IPv4 ping tests.
>      If we fix "ping6" to also support this, then we could also run the
>      IPv6 ping tests.

Ah, yeah that would be a nice improvement.

[1] https://git.savannah.gnu.org/cgit/coreutils.git/tree/tests

  • 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