summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2023-03-02 00:13:22 -0500
committerMatt Turner <mattst88@gmail.com>2023-03-02 09:36:10 -0500
commit19a8df9d8bff279a55b0fa3bb7ba4fbf7fcbefa8 (patch)
tree9e1f6e9d2c2b999c0b9c67632e7fe1223655cd3a
parentf96795b302237db4f96dcae5e041a0658ece151c (diff)
downloadglib-19a8df9d8bff279a55b0fa3bb7ba4fbf7fcbefa8.tar.gz
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.
-rwxr-xr-xglib/tests/assert-msg-test.py6
1 files 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")