From: Pratik Farkase Date: Wed, 5 Aug 2026 13:16:57 +0000 (+0200) Subject: glib-2.0: skip a timing sensitive monotonic-time ptest X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8be25fcc6aeda62cabc126b2a4d9322c81776256;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git glib-2.0: skip a timing sensitive monotonic-time ptest The /monotonic-time-ns/similar test compares g_get_monotonic_time() and g_get_monotonic_time_ns() by spinning until the microsecond clock ticks and asserting the two clocks haven't diverged. This is inherently racy under QEMU emulation on loaded hosts, as the process can be preempted between the clock reads. [YOCTO #16230] : https://bugzilla.yoctoproject.org/show_bug.cgi?id=16230 Signed-off-by: Pratik Farkase Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/glib-2.0/files/skip-monotonic-time-similar.patch b/meta/recipes-core/glib-2.0/files/skip-monotonic-time-similar.patch new file mode 100644 index 0000000000..75eda15c98 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/skip-monotonic-time-similar.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Pratik Farkase +Date: Tue, 5 Aug 2026 08:00:00 +0000 +Subject: [PATCH] Skip /monotonic-time-ns/similar test + +The test_similar test compares g_get_monotonic_time() and +g_get_monotonic_time_ns() by spinning until the microsecond clock ticks +and then asserting the two clocks haven't diverged beyond a factor of +50. This is inherently racy under QEMU emulation on loaded hosts: the +process can be preempted between the two clock reads, causing the +assertion "50 * ns_elapsed > 1000 * us_elapsed" to fail. + +https://bugzilla.yoctoproject.org/show_bug.cgi?id=16230 + +Upstream-Status: Inappropriate [OE-specific] +Signed-off-by: Pratik Farkase +--- + glib/tests/monotonic-time.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/glib/tests/monotonic-time.c b/glib/tests/monotonic-time.c +index 1234567..abcdef0 100644 +--- a/glib/tests/monotonic-time.c ++++ b/glib/tests/monotonic-time.c +@@ -153,7 +153,6 @@ main (int argc, char *argv[]) + g_test_add_func ("/monotonic-time-ns/increasing", test_increasing_ns); + g_test_add_func ("/monotonic-time/usleep", test_usleep); + g_test_add_func ("/monotonic-time-ns/usleep", test_usleep_ns); +- g_test_add_func ("/monotonic-time-ns/similar", test_similar); + + return g_test_run (); + } diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc index f554145bb0..903d56e05f 100644 --- a/meta/recipes-core/glib-2.0/glib.inc +++ b/meta/recipes-core/glib-2.0/glib.inc @@ -235,6 +235,7 @@ SRC_URI += "\ file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ file://skip-timeout.patch \ + file://skip-monotonic-time-similar.patch \ file://CVE-2026-58016-1.patch \ file://CVE-2026-58016-2.patch \ file://0001-gio-tests-services-Fix-installed-service-file-using-.patch \