Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
Date: Sat, 04 Mar 2023 00:48:22
Message-Id: 1677890882.c759e1314a540cc5d08ca4b5b7b7ccbfce7fa277.mattst88@gentoo
1 commit: c759e1314a540cc5d08ca4b5b7b7ccbfce7fa277
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 4 00:47:55 2023 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 4 00:48:02 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c759e131
7
8 dev-libs/glib: Add patch to skip test
9
10 The assert-msg-test.py test doesn't work under sandbox.
11
12 Closes: https://bugs.gentoo.org/871330
13 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
14
15 ...ests-Skip-assert-msg-test.py-if-gdb-fails.patch | 33 ++++++++++++++++++++++
16 dev-libs/glib/glib-2.74.5.ebuild | 2 ++
17 2 files changed, 35 insertions(+)
18
19 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
20 new file mode 100644
21 index 000000000000..ed8fc97b3992
22 --- /dev/null
23 +++ b/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
24 @@ -0,0 +1,33 @@
25 +From 19a8df9d8bff279a55b0fa3bb7ba4fbf7fcbefa8 Mon Sep 17 00:00:00 2001
26 +From: Matt Turner <mattst88@×××××.com>
27 +Date: Thu, 2 Mar 2023 00:13:22 -0500
28 +Subject: [PATCH] tests: Skip assert-msg-test.py if gdb fails
29 +
30 +Similar to commit 6e44151bf74d, skip the test if gdb is unable to read
31 +/proc/PID/mem, which gdb does as a fallback if ptrace is unavailable.
32 +
33 +This allows the test to skip when run under Gentoo's sandbox.
34 +---
35 + glib/tests/assert-msg-test.py | 6 +++---
36 + 1 file changed, 3 insertions(+), 3 deletions(-)
37 +
38 +diff --git a/glib/tests/assert-msg-test.py b/glib/tests/assert-msg-test.py
39 +index 4936fa083..33aa2249e 100755
40 +--- a/glib/tests/assert-msg-test.py
41 ++++ b/glib/tests/assert-msg-test.py
42 +@@ -158,9 +158,9 @@ class TestAssertMessage(unittest.TestCase):
43 +
44 + # Some CI environments disable ptrace (as they’re running in a
45 + # container). If so, skip the test as there’s nothing we can do.
46 +- if (
47 +- result.info.returncode != 0
48 +- and "ptrace: Operation not permitted" in result.err
49 ++ if result.info.returncode != 0 and (
50 ++ "ptrace: Operation not permitted" in result.err
51 ++ or "warning: opening /proc/PID/mem file for lwp" in result.err
52 + ):
53 + self.skipTest("GDB is not functional due to ptrace being disabled")
54 +
55 +--
56 +2.39.2
57 +
58
59 diff --git a/dev-libs/glib/glib-2.74.5.ebuild b/dev-libs/glib/glib-2.74.5.ebuild
60 index 678d48cb72dd..f0c142206738 100644
61 --- a/dev-libs/glib/glib-2.74.5.ebuild
62 +++ b/dev-libs/glib/glib-2.74.5.ebuild
63 @@ -69,6 +69,8 @@ MULTILIB_CHOST_TOOLS=(
64
65 PATCHES=(
66 "${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
67 +
68 + "${FILESDIR}"/${P}-tests-Skip-assert-msg-test.py-if-gdb-fails.patch
69 )
70
71 pkg_setup() {