* [OE-core][PATCH v1] glib-2.0: skip a timing sensitive monotonic-time ptest
@ 2026-08-05 13:16 Pratik Farkase
2026-08-05 14:26 ` Alexander Kanavin
0 siblings, 1 reply; 2+ messages in thread
From: Pratik Farkase @ 2026-08-05 13:16 UTC (permalink / raw)
To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase
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 <pratik.farkase@est.tech>
---
.../files/skip-monotonic-time-similar.patch | 32 +++++++++++++++++++
meta/recipes-core/glib-2.0/glib.inc | 1 +
2 files changed, 33 insertions(+)
create mode 100644 meta/recipes-core/glib-2.0/files/skip-monotonic-time-similar.patch
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 <pratik.farkase@est.tech>
+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 <pratik.farkase@est.tech>
+---
+ 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 \
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [OE-core][PATCH v1] glib-2.0: skip a timing sensitive monotonic-time ptest
2026-08-05 13:16 [OE-core][PATCH v1] glib-2.0: skip a timing sensitive monotonic-time ptest Pratik Farkase
@ 2026-08-05 14:26 ` Alexander Kanavin
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Kanavin @ 2026-08-05 14:26 UTC (permalink / raw)
To: pratik.farkase; +Cc: openembedded-core, pratik.farkase
On Wed, 5 Aug 2026 at 15:17, Pratik Farkase via lists.openembedded.org
<pratik.farkase=est.tech@lists.openembedded.org> wrote:
> +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]
Hello Pratik,
the patch is Inappropriate, but it is not oe-specific; the issue can
happen on any loaded host. The actual reason for Inappropriate status
is: it does not address the issue in the test, but simply disables it
altogether, which is not an appropriate fix to suggest to upstream.
Can you please open a ticket upstream, and include the link in the
patch, like below?
Upstream-Status: Inappropriate [upstream ticket: <link>]
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-05 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 13:16 [OE-core][PATCH v1] glib-2.0: skip a timing sensitive monotonic-time ptest Pratik Farkase
2026-08-05 14:26 ` Alexander Kanavin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox