1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From: Matt Turner <mattst88@gmail.com>
Date: Thu, 2 Mar 2023 00:13:22 -0500
Subject: 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.
(cherry picked from commit 19a8df9d8bff279a55b0fa3bb7ba4fbf7fcbefa8)
Origin: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3307
Applied-upstream: 2.74.7, commit:f36c8876e796f20b6bddcfaf7dad7301c1049c04
---
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 5e5f3fb..edc506f 100755
--- a/glib/tests/assert-msg-test.py
+++ b/glib/tests/assert-msg-test.py
@@ -157,9 +157,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")
|