libnl: upgrade 3.11.0 -> 3.12.0
PATCH 1/1 libnl: upgrade 3.11.0 -> 3.12.0
From: Alexander Kanavin <[email protected]>
Remove a patch as the issue has been fixed upstream.
Backport a couple patches to address ptest issues due to missing kernel modules (they're not built in standard linux-yocto):
https://github.com/thom311/libnl/issues/448
---
...nd-use-_nltst_skip_eopnotsupp-helper.patch | 81 ++++++++++++
...-cksuite-all-netns.c-disable-route_1.patch | 31 -----
...us-tests-when-kernel-returns-EOPNOTS.patch | 120 ++++++++++++++++++
.../{libnl_3.11.0.bb => libnl_3.12.0.bb} | 5 +-
4 files changed, 204 insertions(+), 33 deletions(-)
create mode 100644 meta/recipes-support/libnl/files/0001-tests-add-and-use-_nltst_skip_eopnotsupp-helper.patch
delete mode 100644 meta/recipes-support/libnl/files/0001-tests-cksuite-all-netns.c-disable-route_1.patch
create mode 100644 meta/recipes-support/libnl/files/0002-tests-skip-various-tests-when-kernel-returns-EOPNOTS.patch
rename meta/recipes-support/libnl/{libnl_3.11.0.bb => libnl_3.12.0.bb} (90%)meta/recipes-support/libnl/files/0001-tests-add-and-use-_nltst_skip_eopnotsupp-helper.patch new file +81 -0
@@ -0,0 +1,81 @@ +From 193bd72d1ca66f7c97fdc78782617302b7724c52 Mon Sep 17 00:00:00 2001 +From: Thomas Haller <[email protected]> +Date: Tue, 23 Dec 2025 21:31:06 +0100 +Subject: [PATCH] tests: add and use _nltst_skip_eopnotsupp() helper + +Upstream-Status: Backport [https://github.com/thom311/libnl/commit/f680f27] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + tests/cksuite-all-netns.c | 3 +-- + tests/cksuite-route-nh.c | 4 +--- + tests/nl-test-util.c | 11 +++++++++++ + tests/nl-test-util.h | 4 ++++ + 4 files changed, 17 insertions(+), 5 deletions(-) + +diff --git a/tests/cksuite-all-netns.c b/tests/cksuite-all-netns.c +index ff6fd65..4714db2 100644 +--- a/tests/cksuite-all-netns.c ++++ b/tests/cksuite-all-netns.c +@@ -273,8 +273,7 @@ START_TEST(test_create_iface) + } + + r = rtnl_link_add(sk, link, NLM_F_CREATE); +- if (r == -NLE_OPNOTSUPP) { +- /* Hm, no kernel module? Skip the test. */ ++ if (_nltst_skip_eopnotsupp(r)) { + _nltst_assert_link_not_exists(IFNAME); + IFNAME = NULL; + return; +diff --git a/tests/cksuite-route-nh.c b/tests/cksuite-route-nh.c +index 07a7a83..8409e18 100644 +--- a/tests/cksuite-route-nh.c ++++ b/tests/cksuite-route-nh.c +@@ -1054,10 +1054,8 @@ START_TEST(test_kernel_roundtrip_encap_ila) + ck_assert_int_eq(rtnl_nh_set_oif(nh, (uint32_t)ifindex_dummy), 0); + ck_assert_int_eq(rtnl_nh_set_family(nh, AF_INET6), 0); + ret = rtnl_nh_add(sk, nh, NLM_F_CREATE); +- if (ret == -NLE_OPNOTSUPP) { +- /* ila module is not loaded - skipping */ ++ if (_nltst_skip_eopnotsupp(ret)) + return; +- } + ck_assert_int_eq(ret, 0); + + ck_assert_int_eq(rtnl_nh_alloc_cache(sk, AF_UNSPEC, &cache), 0); +diff --git a/tests/nl-test-util.c b/tests/nl-test-util.c +index 51c04c6..75bb540 100644 +--- a/tests/nl-test-util.c ++++ b/tests/nl-test-util.c +@@ -838,6 +838,17 @@ bool _nltst_skip_no_iproute2(const char *msg) + + /*****************************************************************************/ + ++bool _nltst_skip_eopnotsupp(int err) ++{ ++ if (err != -NLE_OPNOTSUPP) ++ return false; ++ ++ printf("skip test after operation failed with NLE_OPNOTSUPP. This indicates missing kernel support"); ++ return true; ++} ++ ++/*****************************************************************************/ ++ + void _nltst_add_dummy_and_up(struct nl_sock *sk, const char *ifname, + int *out_ifindex) + { +diff --git a/tests/nl-test-util.h b/tests/nl-test-util.h +index ecae885..a2c0e3b 100644 +--- a/tests/nl-test-util.h ++++ b/tests/nl-test-util.h +@@ -449,6 +449,10 @@ bool _nltst_skip_no_iproute2(const char *msg); + + /*****************************************************************************/ + ++bool _nltst_skip_eopnotsupp(int err); ++ ++/*****************************************************************************/ ++ + typedef struct { + int addr_family; + int ifindex;
meta/recipes-support/libnl/files/0001-tests-cksuite-all-netns.c-disable-route_1.patch deleted +0 -31
@@ -1,31 +0,0 @@ -From 9e45c8809fc4e0aa1dd2ec2ac3e57352049f1b92 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Tue, 20 Aug 2024 19:01:59 +0200 -Subject: [PATCH] tests/cksuite-all-netns.c: disable route_1 - -This is a new test added in https://github.com/thom311/libnl/commit/49f7822961f5bc6b18cd2a2d3f3b8d2ab0896d3f -and while it passes on host Debian, it doesn't inside poky. - -Investigation into why is proceeding slowly, and I'm simply -not skilled enough in AF_NETLINK, so let's disable until the -core reason for the fail is arrived at. - -Upstream-Status: Inappropriate [fail reported and investigated at https://github.com/thom311/libnl/issues/399] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - tests/cksuite-all-netns.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/cksuite-all-netns.c b/tests/cksuite-all-netns.c -index 5b9d3a5..b2fc46a 100644 ---- a/tests/cksuite-all-netns.c -+++ b/tests/cksuite-all-netns.c -@@ -341,7 +341,7 @@ Suite *make_nl_netns_suite(void) - nltst_netns_fixture_teardown); - tcase_add_test(tc, cache_and_clone); - tcase_add_loop_test(tc, test_create_iface, 0, 17); -- tcase_add_test(tc, route_1); -+ //tcase_add_test(tc, route_1); - suite_add_tcase(suite, tc); - - return suite;
meta/recipes-support/libnl/files/0002-tests-skip-various-tests-when-kernel-returns-EOPNOTS.patch new file +120 -0
120 lines not on this page · raw message
meta/recipes-support/libnl/libnl_3.12.0.bb renamed from meta/recipes-support/libnl/libnl_3.11.0.bb +3 -2
@@ -16,10 +16,11 @@ DEPENDS = "flex-native bison-native" SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz \ file://run-ptest \ - file://0001-tests-cksuite-all-netns.c-disable-route_1.patch \ + file://0002-tests-skip-various-tests-when-kernel-returns-EOPNOTS.patch \ + file://0001-tests-add-and-use-_nltst_skip_eopnotsupp-helper.patch \ " -SRC_URI[sha256sum] = "2a56e1edefa3e68a7c00879496736fdbf62fc94ed3232c0baba127ecfa76874d" +SRC_URI[sha256sum] = "fc51ca7196f1a3f5fdf6ffd3864b50f4f9c02333be28be4eeca057e103c0dd18" GITHUB_BASE_URI = "https://github.com/thom311/${BPN}/releases" UPSTREAM_CHECK_REGEX = "releases/tag/libnl(?P<pver>.+)"
Signature · 1 line
2.47.3
Quoted 10 lines · Alexander Kanavin via lists.openembedded.org
From: Alexander Kanavin <[email protected]>
Remove a patch as the issue has been fixed upstream.
Backport a couple patches to address ptest issues due to missing kernel modules (they're not built in standard linux-yocto):
https://github.com/thom311/libnl/issues/448Signed-off-by Alexander Kanavin <[email protected]>---
Hi Alexander,
Just some note: it looks like some ptest is failing intermittently on ARM64 after this upgrade. I'm not sure how bad the whole situation is, but it's bad enough that I already saw it fail twice today:
Failed ptests:
{'libnl': ['nl-test-util.c:Core:route_1_The_list_of_2_routes_did_not_find_a_one-to-one_match_with_the_list_of_3_expected_routes']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/2800
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/2802
Yet on both times, the rebuild succeed. No issues on other architectures.
I will keep the patch in my branch, so I will try to monitor the failure frequency.
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 7 lines · Mathieu Dubois-Briand
Just some note: it looks like some ptest is failing intermittently on ARM64 after this upgrade. I'm not sure how bad the whole situation is, but it's bad enough that I already saw it fail twice today:
Failed ptests:
{'libnl': ['nl-test-util.c:Core:route_1_The_list_of_2_routes_did_not_find_a_one-to-one_match_with_the_list_of_3_expected_routes']}
Quoted 8 lines
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/2800
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/2802Yet on both times, the rebuild succeed. No issues on other architectures.
I will keep the patch in my branch, so I will try to monitor the failure frequency.
Hello Mathieu,
the update has landed in master, let me know if you see it happening again. It shouldn't be difficult to patch the test out and file a ticket upstream, I just want a definite confirmation of the intermittent issue.
Alex
Quoted 19 lines · Alexander Kanavin via lists.openembedded.org
Quoted 7 lines · Mathieu Dubois-Briand
Just some note: it looks like some ptest is failing intermittently on ARM64 after this upgrade. I'm not sure how bad the whole situation is, but it's bad enough that I already saw it fail twice today:
Failed ptests:
{'libnl': ['nl-test-util.c:Core:route_1_The_list_of_2_routes_did_not_find_a_one-to-one_match_with_the_list_of_3_expected_routes']}Quoted 8 lines
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/2800
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/2802Yet on both times, the rebuild succeed. No issues on other architectures.
I will keep the patch in my branch, so I will try to monitor the failure frequency.
Quoted 8 lines
Hello Mathieu,
the update has landed in master, let me know if you see it happening again. It shouldn't be difficult to patch the test out and file a ticket upstream, I just want a definite confirmation of the intermittent issue.
Alex
Hi Alex,
For some reason this did not happen on master so far, but I bet it will happen soon. I opened a bugzilla entry to track these:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=16118
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com