Skip to contentSkip to conversation

openl2tp: fix rpcbind status check in run-ptest

PATCH New Khem Raj 1 participant 5 messages Oct 15

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/5 openl2tp: fix rpcbind status check in run-ptest

The final rpcbind check chained 'which systemctl && systemctl status || service rpcbind status', so on sysvinit images without systemctl it fell back to 'service', which may not exist, and the tests were skipped even though rpcbind was running. Check the status with the same init system that was used to start it.

AI-Generated: Uses Claude Code

---
 meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest +2 -2
index a40b6c4228..61158d4519 100644
@@ -43,11 +43,11 @@ zcat /proc/config.gz | grep CONFIG_PPPOL2TP=m > /dev/null || exit_cus "Failed to
 SYSV_INIT="/etc/init.d/rpcbind"
 if [ -e ${SYSV_INIT} ]; then
 	${SYSV_INIT} status > /dev/null || ${SYSV_INIT} start > /dev/null
+	${SYSV_INIT} status > /dev/null
 else
 	systemctl status rpcbind > /dev/null || systemctl start rpcbind > /dev/null
+	systemctl status rpcbind > /dev/null
 fi
-
-which systemctl > /dev/null && systemctl status rpcbind > /dev/null || service rpcbind status > /dev/null
 [ $? -ne 0 ] && exit_cus "Failed to start rpcbind service, skip the tests." 1
 
 # backup the below files
author
#1 lore raw

PATCH 2/5 python3-dnspython: seed resolv.conf from /proc/net/pnp in run-ptest

The live resolver tests use the system resolver configuration. When the network is configured by the kernel ip= parameter and nothing in userspace writes /etc/resolv.conf, the nameserver is only available in /proc/net/pnp and the tests fail with "no nameservers". Seed resolv.conf from it when it has no nameserver entry.

AI-Generated: Uses Claude Code

---
 .../recipes-devtools/python/python3-dnspython/run-ptest  | 9 +++++++++
 1 file changed, 9 insertions(+)
meta-python/recipes-devtools/python/python3-dnspython/run-ptest +9 -0
index 8d2017d39c..cb674db8a0 100644
@@ -1,3 +1,12 @@
 #!/bin/sh
 
+# The live resolver tests use the system resolver configuration. When the
+# network is set up by the kernel's ip= parameter and nothing in userspace
+# (e.g. systemd-resolved) writes /etc/resolv.conf from it, the nameserver is
+# only available in /proc/net/pnp, so the tests fail with "no nameservers"
+# even though the Internet is reachable. Seed resolv.conf from it in that case.
+if ! grep -qs '^nameserver' /etc/resolv.conf && grep -qs '^nameserver' /proc/net/pnp; then
+    grep '^nameserver' /proc/net/pnp >> /etc/resolv.conf
+fi
+
 pytest --automake
author
#2 lore raw

PATCH 3/5 python3-parse-type: fix test_numbered ptest with parse 1.22.2

In reply to Khem Raj

parse 1.22.2 made {:f} also accept nan/inf, which changed the generated regex. Update the copied parse test expectation to match.

AI-Generated: Uses Claude Code

---
 ...e-1.22.2-float-pattern-in-test_numbe.patch | 37 +++++++++++++++++++
 .../python/python3-parse-type_0.6.6.bb        |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-parse-type/0002-tests-match-parse-1.22.2-float-pattern-in-test_numbe.patch
meta-python/recipes-devtools/python/python3-parse-type/0002-tests-match-parse-1.22.2-float-pattern-in-test_numbe.patch new file +37 -0
new file mode 100644
index 0000000000..8860080c38
@@ -0,0 +1,37 @@
+From d3ba98005ddf52d739d2e9056b53ec2f7884ef8b Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 1 Oct 2026 07:00:36 +0000
+Subject: [PATCH] tests: match parse 1.22.2 float pattern in test_numbered
+
+tests/parse_tests/ is a copy of the test suite of the external parse
+module, run against whichever parse is installed. parse 1.22.2 (issue249)
+made {:f} also accept nan/inf, so the generated regex for "{0:f} {1:f}"
+changed and the copied test_numbered expectation no longer matches.
+
+Update the expectation to the one parse 1.22.2's own tests/test_pattern.py
+uses.
+
+Upstream-Status: Pending
+
+AI-Generated: Uses Claude Code
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tests/parse_tests/test_pattern.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tests/parse_tests/test_pattern.py b/tests/parse_tests/test_pattern.py
+index abc19d6..039ebde 100644
+--- a/tests/parse_tests/test_pattern.py
++++ b/tests/parse_tests/test_pattern.py
+@@ -33,7 +33,10 @@ def test_named_typed():
+ def test_numbered():
+     _test_expression("{0}", r"(.+?)")
+     _test_expression("{0} {1}", r"(.+?) (.+?)")
+-    _test_expression("{0:f} {1:f}", r"([-+ ]?\d*\.\d+) ([-+ ]?\d*\.\d+)")
++    _test_expression(
++        "{0:f} {1:f}",
++        r"([-+ ]?(?:\d*\.\d+|nan|NAN|inf|INF)) ([-+ ]?(?:\d*\.\d+|nan|NAN|inf|INF))",
++    )
+
+
+ def test_bird():
meta-python/recipes-devtools/python/python3-parse-type_0.6.6.bb +1 -0
index 86f01f12db..075d32de1a 100644
@@ -7,6 +7,7 @@ SRC_URI[sha256sum] = "513a3784104839770d690e04339a8b4d33439fcd5dd99f2e4580f9fc10
 SRC_URI += " \
     file://run-ptest \
     file://0001-drop-the-six-dependency.patch \
+    file://0002-tests-match-parse-1.22.2-float-pattern-in-test_numbe.patch \
 "
 
 inherit pypi ptest python_setuptools_build_meta
author
#3 lore raw

PATCH 4/5 python3-pytest-benchmark: add missing runtime dependencies

In reply to Khem Raj

The plugin imports modules from the datetime, json, misc, netclient, numbers, profile and statistics python3 packages, so ptests of recipes using it fail on images that don't pull those in otherwise.

AI-Generated: Uses Claude Code

---
 .../python/python3-pytest-benchmark_5.1.0.bb       | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
meta-python/recipes-devtools/python/python3-pytest-benchmark_5.1.0.bb +13 -1
index 791e6df3f0..0aa2c24d30 100644
@@ -9,6 +9,18 @@ inherit pypi setuptools3
 
 PYPI_PACKAGE_SDIST = "pytest-benchmark"
 
-RDEPENDS:${PN} += "python3-core python3-py-cpuinfo python3-pytest python3-aspectlib"
+RDEPENDS:${PN} += "\
+    python3-aspectlib \
+    python3-core \
+    python3-datetime \
+    python3-json \
+    python3-misc \
+    python3-netclient \
+    python3-numbers \
+    python3-profile \
+    python3-py-cpuinfo \
+    python3-pytest \
+    python3-statistics \
+"
 
 BBCLASSEXTEND = "native nativesdk"
author
#4 lore raw

PATCH 5/5 kmscon: fix declaration after case label in font_psf

In reply to Khem Raj

kmscon builds with -std=gnu99 -Werror, and clang rejects the declaration directly after the default: label in font_psf.c as a C23 extension. Give that case its own block scope.

AI-Generated: Uses Claude Code

---
 ...on-after-label-for-pre-C23-compilers.patch | 31 +++++++++++++++++++
 .../recipes-graphics/kmscon/kmscon_10.0.4.bb  |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/kmscon/kmscon/0003-font_psf-Fix-declaration-after-label-for-pre-C23-compilers.patch
meta-oe/recipes-graphics/kmscon/kmscon/0003-font_psf-Fix-declaration-after-label-for-pre-C23-compilers.patch new file +31 -0
new file mode 100644
index 0000000000..8bfec26d4e
@@ -0,0 +1,31 @@
+From: Khem Raj <[email protected]>
+Date: Sat, 10 Oct 2026 00:00:00 +0000
+Subject: [PATCH] font_psf: Fix declaration after label for pre-C23 compilers
+
+kmscon builds with -std=gnu99, where a label (including a case label)
+must be followed by a statement, not a declaration. Clang rejects the
+"uint8_t i" declaration directly after "default:" with
+-Werror,-Wc23-extensions. Give the default case its own block scope.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+--- a/src/font/font_psf.c
++++ b/src/font/font_psf.c
+@@ -394,7 +394,7 @@
+ 			case 0xff:
+ 				ch++;
+ 				break;
+-			default:
++			default: {
+ 				uint8_t i = utf8_len(code.map[0]);
+ 				if (i) {
+ 					code.val = ((uint32_t)(code.map[0] & (0xFF >> (2 + i)))
+@@ -408,6 +408,7 @@
+ 				if (unicode_table_add(self, code.val, ch))
+ 					return 1;
+ 			}
++			}
+ 		}
+ 		ucode_idx = 0;
+ 	}
meta-oe/recipes-graphics/kmscon/kmscon_10.0.4.bb +1 -0
index 400d9b5f59..3ece44b175 100644
@@ -26,6 +26,7 @@ SRCREV = "68fc8e1b2601e816e3a4ef95e3d8e700677509b9"
 SRC_URI += " \
     file://0001-uterm-treat-platform-display-controllers-as-primary-GPUs.patch \
     file://0002-vt_libseat-Fix-build-error-due-to-logging-changes.patch \
+    file://0003-font_psf-Fix-declaration-after-label-for-pre-C23-compilers.patch \
 "
 
 inherit meson pkgconfig systemd