From: Pratik Farkase <pratik.farkase@est.tech>
To: openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com, Pratik Farkase <pratik.farkase@est.tech>
Subject: [OE-core][PATCH v1] glib-2.0: skip a timing sensitive monotonic-time ptest
Date: Wed, 5 Aug 2026 15:16:57 +0200 [thread overview]
Message-ID: <20260805131657.35726-1-pratik.farkase@est.tech> (raw)
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
next reply other threads:[~2026-08-05 13:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 13:16 Pratik Farkase [this message]
2026-08-05 14:26 ` [OE-core][PATCH v1] glib-2.0: skip a timing sensitive monotonic-time ptest Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260805131657.35726-1-pratik.farkase@est.tech \
--to=pratik.farkase@est.tech \
--cc=openembedded-core@lists.openembedded.org \
--cc=pratik.farkase@ericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox