Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libnftnl/files/, net-libs/libnftnl/
Date: Thu, 09 Jan 2020 21:46:42
Message-Id: 1578606364.c2daf278fd2012f5470e527979434180e3bf0c6a.whissi@gentoo
1 commit: c2daf278fd2012f5470e527979434180e3bf0c6a
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 9 21:46:04 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 9 21:46:04 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2daf278
7
8 net-libs/libnftnl: fix nft-flowtable-test
9
10 Closes: https://bugs.gentoo.org/702204
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 .../libnftnl-1.1.5-fix-nft-flowtable-test.patch | 40 ++++++++++++++++++++++
15 net-libs/libnftnl/libnftnl-1.1.5.ebuild | 2 ++
16 2 files changed, 42 insertions(+)
17
18 diff --git a/net-libs/libnftnl/files/libnftnl-1.1.5-fix-nft-flowtable-test.patch b/net-libs/libnftnl/files/libnftnl-1.1.5-fix-nft-flowtable-test.patch
19 new file mode 100644
20 index 00000000000..312ff16eecb
21 --- /dev/null
22 +++ b/net-libs/libnftnl/files/libnftnl-1.1.5-fix-nft-flowtable-test.patch
23 @@ -0,0 +1,40 @@
24 +From b2388765e0c4405442faa13845419f6a35d0134c Mon Sep 17 00:00:00 2001
25 +From: Phil Sutter <phil@×××.cc>
26 +Date: Mon, 2 Dec 2019 18:29:56 +0100
27 +Subject: tests: flowtable: Don't check NFTNL_FLOWTABLE_SIZE
28 +
29 +Marshalling code around that attribute has been dropped by commit
30 +d1c4b98c733a5 ("flowtable: remove NFTA_FLOWTABLE_SIZE") so it's value is
31 +lost during the test.
32 +
33 +Assuming that NFTNL_FLOWTABLE_SIZE will receive kernel support at a
34 +later point, leave the test code in place but just comment it out.
35 +
36 +Fixes: d1c4b98c733a5 ("flowtable: remove NFTA_FLOWTABLE_SIZE")
37 +Signed-off-by: Phil Sutter <phil@×××.cc>
38 +Acked-by: Pablo Neira Ayuso <pablo@×××××××××.org>
39 +---
40 + tests/nft-flowtable-test.c | 2 ++
41 + 1 file changed, 2 insertions(+)
42 +
43 +(limited to 'tests/nft-flowtable-test.c')
44 +
45 +diff --git a/tests/nft-flowtable-test.c b/tests/nft-flowtable-test.c
46 +index 3edb00d..8ab8d4c 100644
47 +--- a/tests/nft-flowtable-test.c
48 ++++ b/tests/nft-flowtable-test.c
49 +@@ -33,9 +33,11 @@ static void cmp_nftnl_flowtable(struct nftnl_flowtable *a, struct nftnl_flowtabl
50 + if (nftnl_flowtable_get_u32(a, NFTNL_FLOWTABLE_USE) !=
51 + nftnl_flowtable_get_u32(b, NFTNL_FLOWTABLE_USE))
52 + print_err("Flowtable use mismatches");
53 ++#if 0
54 + if (nftnl_flowtable_get_u32(a, NFTNL_FLOWTABLE_SIZE) !=
55 + nftnl_flowtable_get_u32(b, NFTNL_FLOWTABLE_SIZE))
56 + print_err("Flowtable size mismatches");
57 ++#endif
58 + if (nftnl_flowtable_get_u32(a, NFTNL_FLOWTABLE_FLAGS) !=
59 + nftnl_flowtable_get_u32(b, NFTNL_FLOWTABLE_FLAGS))
60 + print_err("Flowtable flags mismatches");
61 +--
62 +cgit v1.2.1
63 +
64
65 diff --git a/net-libs/libnftnl/libnftnl-1.1.5.ebuild b/net-libs/libnftnl/libnftnl-1.1.5.ebuild
66 index 9d15d542e45..176587558f1 100644
67 --- a/net-libs/libnftnl/libnftnl-1.1.5.ebuild
68 +++ b/net-libs/libnftnl/libnftnl-1.1.5.ebuild
69 @@ -20,6 +20,8 @@ RDEPEND=">=net-libs/libmnl-1.0.3"
70 BDEPEND="virtual/pkgconfig"
71 DEPEND="${RDEPEND}"
72
73 +PATCHES=( "${FILESDIR}"/${P}-fix-nft-flowtable-test.patch )
74 +
75 pkg_setup() {
76 if kernel_is ge 3 13; then
77 CONFIG_CHECK="~NF_TABLES"