From nobody Sat Feb 18 22:28:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PK3HD5dc5z3ryD2; Sat, 18 Feb 2023 22:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PK3HD3P8Xz3mmx; Sat, 18 Feb 2023 22:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676759304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekhJHgt8c7mPmV8yD0rBFN5rR7nLK/QXDoae9ZeFDik=; b=H+cx6Tkdx+NRn+gJ8TW8rjrKsavyIJU+vqggnc8OyseApkfMMymX+LWASIJc8vc5LCp8UE h/p8NmmTFstSgLLrO4e6/QdQSTyTzXGW5LV/63jjsMWncMvyi0UdPEwcBoSJClRqjKpnjH XcGRSzY+LyQIMxBL63bTVB8ekbHn5vMqLLPQ6z+VieT2bR8yDFRV8ce9LG27RvMoTSFezi o1Bwe1D/NR0Zlp7sa56WjOe3cKdgAMrfv9y8no9OLYr9Nn4CVK251N3Lr9Rih7PP1wZZ9x dpRgsl6GlFon5WlGZw7U7/R9Q+f64hTD1dstV5AayUQY1YJn9UFlP/S2djqdLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676759304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekhJHgt8c7mPmV8yD0rBFN5rR7nLK/QXDoae9ZeFDik=; b=yeQujFSnbeicJWbiVeZbS/egpAl9VTpHYwf899TkQ31fKpvG/eZvP1PCYn4u9VHP2HGECw IllkeJ0Dd3rK0e3d1zPMPfb9o7cHc7PqfvjFyz7cG3jGIZe0/9MmBueJluL9SyUrzLUcUg 5K9DbLV4B7dGy4Xg0rdW8GWrBGKi/+Lb0kn7WDgvmief5F+h4IBjBCuwDBBwO/HUtBh5Dz JHnfrtdRj/JhBliZR4qtDfMVPVMgpZ9uVFDsELPZDn8gn+nfVzq4TLiAmIBwidngcveXjI Q8/QEGK65Np3NY1q2zx6nu9K4BQqkofC2pJaftZzz2P9j3M8W6ylXsUWYJcLAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676759304; a=rsa-sha256; cv=none; b=c1IRC0h49db4/S1yYd/4Hyi4sOnD3+nz3OVn8GmS8yfXeMF+jf3Zi3qftas2Y2JoseKBgo JsyWgF7Ih90fwA4PtlJpVtq/NJ8YdrQo0GkAG3sV0idEbRBRJOerS149V3inPCLYE/swAm KUfL6HwpUikvcSOY6xAJeBj77Q2hWBNcifcX8nm5ALXg0a2ddx45mcGxsaGrAxCHbItKBM o6SsnAXPrp3TApy5PIcvxz8mEnrF7UpHYhiC3G6aqdZ5bgn5gK3F62qTyBqvFplMtSj5tI 8iYB7fUro1++Gz4WSyFlu1kLhWChd27c5oX+DHw+7OpmNSLWO0RBma9IJnVBJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PK3HD2TPyzf7G; Sat, 18 Feb 2023 22:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31IMSO2I070397; Sat, 18 Feb 2023 22:28:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IMSOE9070396; Sat, 18 Feb 2023 22:28:24 GMT (envelope-from git) Date: Sat, 18 Feb 2023 22:28:24 GMT Message-Id: <202302182228.31IMSOE9070396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 79748cec1f1c - main - tests: fix netlink test_dump_ifaces_many test. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79748cec1f1c3437e49d7694e95fc7f438336805 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=79748cec1f1c3437e49d7694e95fc7f438336805 commit 79748cec1f1c3437e49d7694e95fc7f438336805 Author: Alexander V. Chernikov AuthorDate: 2023-02-18 22:26:32 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-02-18 22:28:01 +0000 tests: fix netlink test_dump_ifaces_many test. Consider only loopback interfaces when counting. Otherwise, if pf is loaded, 'pflog0' gets added to the vnet, breaking the test. MFC after: 2 weeks --- tests/sys/netlink/test_rtnl_iface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/sys/netlink/test_rtnl_iface.py b/tests/sys/netlink/test_rtnl_iface.py index cbe5aed8b8ae..35015ea2ec6e 100644 --- a/tests/sys/netlink/test_rtnl_iface.py +++ b/tests/sys/netlink/test_rtnl_iface.py @@ -247,9 +247,7 @@ class TestRtNlIface(NetlinkTestTemplate, SingleVnetTestTemplate): """Tests if interface dummp is not missing interfaces""" ifmap = {} - for ifname in (self.vnet.iface_alias_map["if1"].name, "lo0"): - ifindex = socket.if_nametoindex(ifname) - ifmap[ifindex] = ifname + ifmap[socket.if_nametoindex("lo0")] = "lo0" for i in range(40): ifname = "lo{}".format(i + 1) @@ -300,7 +298,9 @@ class TestRtNlIface(NetlinkTestTemplate, SingleVnetTestTemplate): ifindex = rx_msg.base_hdr.ifi_index assert ifindex == rx_msg.base_hdr.ifi_index - kernel_ifmap[ifindex] = rx_msg.get_nla(IflattrType.IFLA_IFNAME).text + ifname = rx_msg.get_nla(IflattrType.IFLA_IFNAME).text + if ifname.startswith("lo"): + kernel_ifmap[ifindex] = ifname assert kernel_ifmap == ifmap #