From nobody Tue Apr 18 14:10:40 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 4Q15Rh2zbjz458pH; Tue, 18 Apr 2023 14:10:40 +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 4Q15Rh2TZlz4Fjd; Tue, 18 Apr 2023 14:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681827040; 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=eIT6xjBqklEVlhPDLI+f6eNFPCyyJ4uUoAMhO5k0p2o=; b=pA3gs3yYzV+2ufs5jeF9+8g6uLEvCMZTWzWfhOUsV4I3hqtw8uWGKX3A7+9p1r8m4ShB+/ VPohGPHRtXAB6wEPSp6snrMUDnHNn9Lfgp+t9jvXCqJbo0HnjRFQkYXmr/tpJzHHG6SG8g LLQf1p6GQtAj9YQMjg1rDCislKdKCugHTgi2W0iUFEKQAw0C2daVftep/SF8HGVDykXILQ wk9PQaoKvH3we32nIuIY2tf0/PANAZYS34UIsvy+iimuHm6CCprXsVf+FXZywR12l6kiTn vs495DU4fzpagbANL2dAmeSV5BjSLeoHyqwbKGP7iCiRMyItM0W/Ek3yRUG6Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681827040; 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=eIT6xjBqklEVlhPDLI+f6eNFPCyyJ4uUoAMhO5k0p2o=; b=pizofGnmugH6FpYfijsilOfl0qxeMuOCpi3J0uKE5P9DSOOf6gVi5ksPIfWXDhhlydhb0W WspEdW2OuFB71VTmsr0wynXRD2ZCd4N69FtJHYbvvVpx2y5d6BWzs1eD/wVnKEoijkEDMF 8thiZyH2LWdfQipTUfk8qSX4WjAxM6dksYflZ8r4H5eofk6inudTypMpdpSjuQnpn0CkJe zbqCUyoZpkFG1S6m62mOXxbibK4Se1nw0MFPylw5ppBtvbfBjxXDaWu9fh2cnrG0k68Grd IQxbWIH3mMZXQp+SmPED2sSMhIWtJE01fOWmiknAq5yJck9P3xuUfYysr26TGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681827040; a=rsa-sha256; cv=none; b=IL6GYv8H7FhkD+yN/bMu0P2HSGtjWWDNI3NGwP92j8atsxJBYUl89jFu19duqB+QWPIfbh KsoSDQH0+p884qRHi4k0/QruegCMxuF9E8FqxAiIj/H8s0ukRa0cECJY3PqgdElsDwuei9 g9/3CcxwfC5lWhJddvPpUybUG51S+fhjMcnJSK26N5gl1RBl3IRh//P+lgToZaetxPyFDe ezk+04yZuuXINqOZ0vsqVDq7G7gTZ/aOyU+EsKrUum6tJOmvT8cqwLKZnwG6AKh0B9sUpc Z3kmxBW93auavIAGNsPG45oEwsGJ8vVeE2dfRiqVBZkRXjgBiZZ/5UQUV32hoQ== 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 4Q15Rh1LXWzFQQ; Tue, 18 Apr 2023 14:10:40 +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 33IEAeXi088602; Tue, 18 Apr 2023 14:10:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IEAenT088601; Tue, 18 Apr 2023 14:10:40 GMT (envelope-from git) Date: Tue, 18 Apr 2023 14:10:40 GMT Message-Id: <202304181410.33IEAenT088601@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: 04a036601e10 - main - tests: fix netlink type parsing. 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: 04a036601e10237ae00655e515aeb78762eb5d1a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=04a036601e10237ae00655e515aeb78762eb5d1a commit 04a036601e10237ae00655e515aeb78762eb5d1a Author: Alexander V. Chernikov AuthorDate: 2023-04-18 14:09:47 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-04-18 14:09:47 +0000 tests: fix netlink type parsing. Netlink attribute type field is 2 bytes, not one. MFC after: 2 weeks --- tests/atf_python/sys/netlink/attrs.py | 2 +- tests/atf_python/sys/netlink/message.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/atf_python/sys/netlink/attrs.py b/tests/atf_python/sys/netlink/attrs.py index 58fbab7fc8db..9769ef0fc76f 100644 --- a/tests/atf_python/sys/netlink/attrs.py +++ b/tests/atf_python/sys/netlink/attrs.py @@ -21,7 +21,7 @@ class NlAttr(object): @property def nla_type(self): - return self._nla_type & 0x3F + return self._nla_type & 0x3FFF @property def nla_len(self): diff --git a/tests/atf_python/sys/netlink/message.py b/tests/atf_python/sys/netlink/message.py index b6fb2f8e357a..1e2b71775102 100644 --- a/tests/atf_python/sys/netlink/message.py +++ b/tests/atf_python/sys/netlink/message.py @@ -205,7 +205,7 @@ class StdNetlinkMessage(BaseNetlinkMessage): nla_len, len(data) - off ) ) - nla_type = raw_nla_type & 0x3F + nla_type = raw_nla_type & 0x3FFF if nla_type in attr_map: v = attr_map[nla_type] val = v["ad"].cls.from_bytes(data[off:off + nla_len], v["ad"].val)