summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2023-03-03 19:47:55 -0500
committerMatt Turner <mattst88@gentoo.org>2023-03-03 19:48:02 -0500
commitc759e1314a540cc5d08ca4b5b7b7ccbfce7fa277 (patch)
treef07a807c35bded75125a92244f681975a871f510 /dev-libs/glib
parentsys-fs/cryptmount: drop 6.1.0 (diff)
downloadgentoo-c759e1314a540cc5d08ca4b5b7b7ccbfce7fa277.tar.gz
gentoo-c759e1314a540cc5d08ca4b5b7b7ccbfce7fa277.tar.bz2
gentoo-c759e1314a540cc5d08ca4b5b7b7ccbfce7fa277.zip
dev-libs/glib: Add patch to skip test
The assert-msg-test.py test doesn't work under sandbox. Closes: https://bugs.gentoo.org/871330 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'dev-libs/glib')
-rw-r--r--dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch33
-rw-r--r--dev-libs/glib/glib-2.74.5.ebuild2
2 files changed, 35 insertions, 0 deletions
diff --git a/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch b/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
new file mode 100644
index 000000000000..ed8fc97b3992
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
@@ -0,0 +1,33 @@
+From 19a8df9d8bff279a55b0fa3bb7ba4fbf7fcbefa8 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Thu, 2 Mar 2023 00:13:22 -0500
+Subject: [PATCH] tests: Skip assert-msg-test.py if gdb fails
+
+Similar to commit 6e44151bf74d, skip the test if gdb is unable to read
+/proc/PID/mem, which gdb does as a fallback if ptrace is unavailable.
+
+This allows the test to skip when run under Gentoo's sandbox.
+---
+ glib/tests/assert-msg-test.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/glib/tests/assert-msg-test.py b/glib/tests/assert-msg-test.py
+index 4936fa083..33aa2249e 100755
+--- a/glib/tests/assert-msg-test.py
++++ b/glib/tests/assert-msg-test.py
+@@ -158,9 +158,9 @@ class TestAssertMessage(unittest.TestCase):
+
+ # Some CI environments disable ptrace (as they’re running in a
+ # container). If so, skip the test as there’s nothing we can do.
+- if (
+- result.info.returncode != 0
+- and "ptrace: Operation not permitted" in result.err
++ if result.info.returncode != 0 and (
++ "ptrace: Operation not permitted" in result.err
++ or "warning: opening /proc/PID/mem file for lwp" in result.err
+ ):
+ self.skipTest("GDB is not functional due to ptrace being disabled")
+
+--
+2.39.2
+
diff --git a/dev-libs/glib/glib-2.74.5.ebuild b/dev-libs/glib/glib-2.74.5.ebuild
index 678d48cb72dd..f0c142206738 100644
--- a/dev-libs/glib/glib-2.74.5.ebuild
+++ b/dev-libs/glib/glib-2.74.5.ebuild
@@ -69,6 +69,8 @@ MULTILIB_CHOST_TOOLS=(
PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+
+ "${FILESDIR}"/${P}-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
)
pkg_setup() {