From nobody Sat Apr 08 19:45:03 2023 X-Original-To: dev-commits-src-all@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 4Pv5L83vCGz44nsh; Sat, 8 Apr 2023 19:45:04 +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 4Pv5L75JyHz44RD; Sat, 8 Apr 2023 19:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680983103; 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=qn3mnGpV9hlQUNyrNlWs7pUyyB3QyTZewghOpKJrdls=; b=fZKzzYMFu/WfmW3PtVYJSXp3nk6OOqcT7koYFKr4vFL7cGnTS4jKC++GTx+EGCRhkRmls0 TQlDDJAAr2YrCaFbVefeT5+GYkjsP6Nx3SR6Bhnrv+UsuQfN0vH8SgQJ16IWBjDbZ/F3ku jAJ/+PRotCbMPCiKsGbM2lyHLrzG+rFfgNTH3iD1PTSleKFAYgVj/eNkg5loCekD3wu0Cg iEzjw/X++RniEkPHpLeF4jakSD9lLoHI7mXzAFUNHzmYW1vi4A1FBqlt83qA9wnWlg7qu3 +wY1+UD3KAOsJuZ/nBiBc38WT6auEK7kjqI+mQUr0b0936ANn/sRDiTPsVxk8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680983103; 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=qn3mnGpV9hlQUNyrNlWs7pUyyB3QyTZewghOpKJrdls=; b=jo7BdHws8Vg6maBKajNwy8xaHLHvuJeegZ2SqiEgBkfb165nAm/G/pjeChJtW/VBYQTjJj CG57SAv8d/t8GY05svp44ZeuJQtlmUB7PtuguGAYJAV1jff7cXgQPusM95xGHOaTZ4CBl3 3scRbcOJsZksNhRgINR5DRmxPIMeaUgZ8ya+sIsaS2Or7a376DbAz7eFWfTQgQK49dPBgF AzUgMbY1sJ1vvfWvT/ujq2owrqNsGjDAN/1KZiywAXrcq9eVjcbqkg1Oll3QiE0SlQ95dt kFKuWlo8YDxK0Ce7SwrHaegFs0T0O0kRacujZeR0Sa4XLle4jhss6hDO73tfaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680983103; a=rsa-sha256; cv=none; b=uKFwsSMzJojg683LmPyn+4ygOxDS46vY+fqxGQIhCT+cUZJ62Ml4h3AMVlQEm3wNRIQc/8 MJFCwrhefjhEjCi3GfxcknnM6kZuiD96Cyn/YwgietySlHkoX2wfO3qnFoRcRJ0ho0gex8 6g3a5sEb8dhP1JMzFdDPxa/VVpzhK7HF+e4C5xv6fB+aurPDWjcaa4SqcvkztGgTwXdqm0 6/WJyYr05aP+FF6ITCTB0kyXx66e7kmVFIuOmrnDIobxc/fPzzJNj3TM/1/3yJzGEz93Wp SrZeAH0atfC70K6yMCK7/Y6BBYB+4Qp+e249qnAzL5aVBtMxXJPgdrC/k+o5vA== 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 4Pv5L73H3Bzfyy; Sat, 8 Apr 2023 19:45:03 +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 338Jj3D0018946; Sat, 8 Apr 2023 19:45:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 338Jj3Ed018945; Sat, 8 Apr 2023 19:45:03 GMT (envelope-from git) Date: Sat, 8 Apr 2023 19:45:03 GMT Message-Id: <202304081945.338Jj3Ed018945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 0da116b051e4 - stable/13 - tests: fix netlink test_dump_ifaces_many test. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 0da116b051e48e21c43b73e6b82ebb4ebdf7c4b0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=0da116b051e48e21c43b73e6b82ebb4ebdf7c4b0 commit 0da116b051e48e21c43b73e6b82ebb4ebdf7c4b0 Author: Alexander V. Chernikov AuthorDate: 2023-02-18 22:26:32 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-04-08 19:14:41 +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 (cherry picked from commit 79748cec1f1c3437e49d7694e95fc7f438336805) --- 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 c21bf9cb8977..da3db93b05c6 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 #