[PATCH] test: atomicity.py: improve exit probability on failure

classic Classic list List threaded Threaded
2 messages Options
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|

[PATCH] test: atomicity.py: improve exit probability on failure

Some gdb python exceptions on some os environments (e.g. macOS
Sierra, non-codesigned gdb) do not make gdb exit (but to drop down
to nonexistent command line?).
Mitigate this chance by explict SystemExit on all exceptions.
The contents of output file 'gdb.out' is unchanged.
---
 test/atomicity.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/atomicity.py b/test/atomicity.py
index 1ca52b9c4f73..389517e1571e 100644
--- a/test/atomicity.py
+++ b/test/atomicity.py
@@ -71,4 +71,8 @@ class RenameBreakpoint(gdb.Breakpoint):
         return False
 RenameBreakpoint('rename')
 
-gdb.execute('run')
+try:
+    gdb.execute('run')
+except Exception:
+    import traceback
+    raise SystemExit(traceback.format_exc())
--
2.8.2

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] test: atomicity.py: improve exit probability on failure

Tomi Ollila <[hidden email]> writes:

> Some gdb python exceptions on some os environments (e.g. macOS
> Sierra, non-codesigned gdb) do not make gdb exit (but to drop down
> to nonexistent command line?).
> Mitigate this chance by explict SystemExit on all exceptions.
> The contents of output file 'gdb.out' is unchanged.

pushed to master

d
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch