[1/3] iotests.py: Enable faulthandler
diff mbox series

Message ID 20200313083617.8326-2-kwolf@redhat.com
State New
Headers show
Series
  • iotests: Fix intermittent 030 hang
Related show

Commit Message

Kevin Wolf March 13, 2020, 8:36 a.m. UTC
With this, you can send SIGABRT to a hanging test case and you'll get a
Python stack trace so you know where it was hanging.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/iotests.py | 3 +++
 1 file changed, 3 insertions(+)

Comments

John Snow March 16, 2020, 7:56 p.m. UTC | #1
On 3/13/20 4:36 AM, Kevin Wolf wrote:
> With this, you can send SIGABRT to a hanging test case and you'll get a
> Python stack trace so you know where it was hanging.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Reviewed-by: John Snow <jsnow@redhat.com>

Patch
diff mbox series

diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 23043baa26..b859c303a2 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -30,12 +30,15 @@  import logging
 import atexit
 import io
 from collections import OrderedDict
+import faulthandler
 
 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
 from qemu import qtest
 
 assert sys.version_info >= (3,6)
 
+faulthandler.enable()
+
 # This will not work if arguments contain spaces but is necessary if we
 # want to support the override options that ./check supports.
 qemu_img_args = [os.environ.get('QEMU_IMG_PROG', 'qemu-img')]