mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-30 19:06:38 +02:00
tests: Skip assert-msg-test.py if gdb fails
Similar to commit 6e44151bf7
, 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.
This commit is contained in:
@@ -158,9 +158,9 @@ class TestAssertMessage(unittest.TestCase):
|
|||||||
|
|
||||||
# Some CI environments disable ptrace (as they’re running in a
|
# Some CI environments disable ptrace (as they’re running in a
|
||||||
# container). If so, skip the test as there’s nothing we can do.
|
# container). If so, skip the test as there’s nothing we can do.
|
||||||
if (
|
if result.info.returncode != 0 and (
|
||||||
result.info.returncode != 0
|
"ptrace: Operation not permitted" in result.err
|
||||||
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")
|
self.skipTest("GDB is not functional due to ptrace being disabled")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user