From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SPzkJuq8+F7nfwAA0tVLHw (envelope-from ) for ; Sun, 28 Jun 2020 15:53:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id qMavIuq8+F6tCQAAbx9fmQ (envelope-from ) for ; Sun, 28 Jun 2020 15:53:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3CF369404CA for ; Sun, 28 Jun 2020 15:53:13 +0000 (UTC) Received: from localhost ([::1]:52178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpZcE-0001lX-VB for larch@yhetil.org; Sun, 28 Jun 2020 11:53:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpZc6-0001l6-Fx for bug-guix@gnu.org; Sun, 28 Jun 2020 11:53:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpZc6-0001oa-7U for bug-guix@gnu.org; Sun, 28 Jun 2020 11:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jpZc6-0004SR-6q for bug-guix@gnu.org; Sun, 28 Jun 2020 11:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42111: tests/syscalls.scm stumbles on network interface aliases Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 28 Jun 2020 15:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42111 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 42111@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159335955017096 (code B ref -1); Sun, 28 Jun 2020 15:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jun 2020 15:52:30 +0000 Received: from localhost ([127.0.0.1]:46814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpZba-0004Rg-Cd for submit@debbugs.gnu.org; Sun, 28 Jun 2020 11:52:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:50830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpZbV-0004RU-JY for submit@debbugs.gnu.org; Sun, 28 Jun 2020 11:52:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpZbV-0001eG-B5 for bug-guix@gnu.org; Sun, 28 Jun 2020 11:52:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44218) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpZbT-0001ha-4k for bug-guix@gnu.org; Sun, 28 Jun 2020 11:52:25 -0400 Received: from ti0006q161-3115.bb.online.no ([88.95.106.80]:54576 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jpZbS-00075n-Ib for bug-guix@gnu.org; Sun, 28 Jun 2020 11:52:22 -0400 From: Marius Bakke Date: Sun, 28 Jun 2020 17:52:20 +0200 Message-ID: <87y2o7b32j.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -3.11 X-TUID: Jd/K3aiIZCeQ --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello, 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 causes the interface to show up in (network-interface-names), but not (all-network-interface-names), breaking the test. I could not find a procfs file that displays network aliases, so ISTM we either need to add syscalls to check IFLA_IFALIAS, or simply ignore interfaces with a colon (which seems to be required). This patch does the latter and makes the test succeed: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=diff Content-Transfer-Encoding: quoted-printable diff --git a/tests/syscalls.scm b/tests/syscalls.scm index 6acaa0b131..7aa16ce3f4 100644 =2D-- a/tests/syscalls.scm +++ b/tests/syscalls.scm @@ -382,7 +382,10 @@ (member "lo" names)))) =20 (test-assert "network-interface-names" =2D (match (network-interface-names) + (match (filter (lambda (if) + ;; Ignore interface aliases. + (not (string-contains if ":"))) + (network-interface-names)) (((? string? names) ..1) (lset<=3D string=3D? names (all-network-interface-names))))) =20 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl74vLQACgkQoqBt8qM6 VPqy0AgA1ayZ5xwX81s2CnxRJltT0DCBZNNr8Ob8BcecJu3jlcHFJTA2gqMPaDeu nKF7l7s3pdNecb9Dc4BbOWKdH1xrRTCg1rsFPg1hO2SsqinBo/r+7VFvsBBj8XIu zT48pxRnmpOn0JM53QfVYJCHFUAAjViT7uX2LMPoE/8PMhaBWiWu8jVDjoQaBfBW BuCXpNVsrGxEjxuvNMOfo8DixU4fCNU1v1kkPqRikcNhBY1JiecJNewh+fJjAaEv lTUlf2jSYJBZbY36PtC6VZTCRdjHZvSWAuXaJaL7A/oVdQrittvUObTBSNxhQlZ1 EijuYebEjcEmYg5oM+M/qlo/eCXJrw== =5nLf -----END PGP SIGNATURE----- --==-=-=--