From nobody Mon Mar 13 10:18:36 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 4PZt0X2wryz3xVkg; Mon, 13 Mar 2023 10:18:36 +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 4PZt0X2Rk1z3NJf; Mon, 13 Mar 2023 10:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678702716; 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=VLlhu8eeTwbgngX33baJbuj1XbKxw2rWGEQcb0q8JG0=; b=B0DAjAnNr2Z76NjU5fglsSp7u29MkZq/F8RhrHxB81NNCapfhbXRG9Al4ynQNgTFUKuoTU VYNS4JMlC2YBDA2rv8iXC6K+zrqI4pZLc9fzVmXPcbVKVdm+n4yeQWw02UhquREvh7IyVg 8bAkjTimERPBajQjVDL8eVNFR68o46wFzm1auyZnt1KElYd/sgtSWUUpCXMyLwQd22yBOr hCQPuxDsFCwLArxHrUh5A4Bn8LN4srGmPUrwRnRQX+lfHwXw4zZ/+Q6kk22TYhSsHSpRDy VdagQwjJorFR33YijfJnCNUE+SSXgu7VUvGugcgUoAsxVZguY47Ddx2bd38i8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678702716; 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=VLlhu8eeTwbgngX33baJbuj1XbKxw2rWGEQcb0q8JG0=; b=F4TYmcvlTlr/5qmUS/zykNK54lzNKBFyh5ePnjtFV013govwh0m6ALt5yRj1hbnLCYC/2X ibfrNisITsOqXdXjPjJItOgHS6ULrqx0zKCZgKTm6H1vw+ZPpPdq183Qwc8SPQcgjT7Dxp 6+0tsXgiCefJTsdWdFlhRGFsITaq0JDlMUm+pQYiy9U5dYQrcAdg/cQlbGRBY0zVGWXPhB MnJ+x49Fv4gEc+VsSVxu5r351s/YH/cxE5hgUBG0P18XDXQNVU2hPWWDu4TNynxFhs4+Ga KQDU9jtFYyzLYVDsKPq3H0ruTqtMUbCxPjbj8Rl/aW5ffGOh8uX94aaWR7OCBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678702716; a=rsa-sha256; cv=none; b=Zl5OObv85JwVZRdr8x/VyE5kpxo6nFouewfyNkhEmibxKJUoKZy/YhpUXe+Uky2wAXiK6v zq8xW5n77wv92KAS1SAH6nYQndtfFTwyPWqZ0Cf/6F95Pilzu0fCZWwtpX28G+nZMA57SV /XjC/3erVS+R1uxoqfhebEOorcqCFlZvb86ayR9qamPOr6Zzmat6egnm3Ju4LI002gSKit Ao8w2DQACt/XF8ldGQXoFZXfbtBXb77bPxD9EKHtoceGtYlBneol90BqlaFbQAfgsN90Eb A9leW4+Qunhy/TIEghZ9mmLYQo/NAXYulNixFacBQ/nyWBYTz2+4QOA4Vp03dQ== 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 4PZt0X1VQlzpNy; Mon, 13 Mar 2023 10:18:36 +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 32DAIafu082187; Mon, 13 Mar 2023 10:18:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32DAIaA3082186; Mon, 13 Mar 2023 10:18:36 GMT (envelope-from git) Date: Mon, 13 Mar 2023 10:18:36 GMT Message-Id: <202303131018.32DAIaA3082186@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: 90bc2120b51b - main - tests: fix python parsing of netlink nested attributes 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: 90bc2120b51bc5ac9fbcb29763cc47562ee49977 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=90bc2120b51bc5ac9fbcb29763cc47562ee49977 commit 90bc2120b51bc5ac9fbcb29763cc47562ee49977 Author: Alexander V. Chernikov AuthorDate: 2023-03-13 10:17:36 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-03-13 10:17:36 +0000 tests: fix python parsing of netlink nested attributes MFC after: 2 weeks --- tests/atf_python/sys/net/netlink.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/atf_python/sys/net/netlink.py b/tests/atf_python/sys/net/netlink.py index bfbf3217d52a..053eb432e915 100644 --- a/tests/atf_python/sys/net/netlink.py +++ b/tests/atf_python/sys/net/netlink.py @@ -1082,6 +1082,7 @@ rtnl_ifla_attrs = prepare_attrs_map( AttrDescr(IflattrType.IFLA_BROADCAST, NlAttrMac), AttrDescr(IflattrType.IFLA_IFNAME, NlAttrStr), AttrDescr(IflattrType.IFLA_MTU, NlAttrU32), + AttrDescr(IflattrType.IFLA_LINK, NlAttrU32), AttrDescr(IflattrType.IFLA_PROMISCUITY, NlAttrU32), AttrDescr(IflattrType.IFLA_OPERSTATE, NlAttrU8), AttrDescr(IflattrType.IFLA_CARRIER, NlAttrU8), @@ -1279,8 +1280,8 @@ class StdNetlinkMessage(BaseNetlinkMessage): val = v["ad"].cls.from_bytes(data[off : off + nla_len], v["ad"].val) if "child" in v: # nested - attrs, _ = self.parse_attrs(data[off : off + nla_len], v["child"]) - val = NlAttrNested(raw_nla_type, attrs) + attrs, _ = self.parse_attrs(data[off + 4 : off + nla_len], v["child"]) + val = NlAttrNested(v["ad"].val, attrs) else: # unknown attribute val = NlAttr(raw_nla_type, data[off + 4 : off + nla_len])