bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42111: tests/syscalls.scm stumbles on network interface aliases


From: Ludovic Courtès
Subject: bug#42111: tests/syscalls.scm stumbles on network interface aliases
Date: Sun, 28 Jun 2020 23:02:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi!

Marius Bakke <marius@gnu.org> skribis:

> The "network-interface-names" test from tests/syscalls.scm fails if a
> network interface alias is configured.
>
> I.e. this command:
>
>   ip addr add 127.0.0.2/8 dev lo label lo:lcat

Woow.  🐈

> diff --git a/tests/syscalls.scm b/tests/syscalls.scm
> index 6acaa0b131..7aa16ce3f4 100644
> --- a/tests/syscalls.scm
> +++ b/tests/syscalls.scm
> @@ -382,7 +382,10 @@
>       (member "lo" names))))
>  
>  (test-assert "network-interface-names"
> -  (match (network-interface-names)
> +  (match (filter (lambda (if)
> +                   ;; Ignore interface aliases.

Perhaps add “since they don’t show up in (all-network-interface-names)”.

> +                   (not (string-contains if ":")))
> +                 (network-interface-names))

You can use ‘remove’ instead of ‘filter’ + ‘not’.

Otherwise LGTM, thanks!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]