mirror of https://github.com/xemu-project/xemu.git
iotests.py: Enable faulthandler
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> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200313083617.8326-2-kwolf@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
7b1e7cb7c5
commit
aa1cbeb86b
|
@ -30,12 +30,15 @@ import logging
|
||||||
import atexit
|
import atexit
|
||||||
import io
|
import io
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
import faulthandler
|
||||||
|
|
||||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
|
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
|
||||||
from qemu import qtest
|
from qemu import qtest
|
||||||
|
|
||||||
assert sys.version_info >= (3,6)
|
assert sys.version_info >= (3,6)
|
||||||
|
|
||||||
|
faulthandler.enable()
|
||||||
|
|
||||||
# This will not work if arguments contain spaces but is necessary if we
|
# This will not work if arguments contain spaces but is necessary if we
|
||||||
# want to support the override options that ./check supports.
|
# want to support the override options that ./check supports.
|
||||||
qemu_img_args = [os.environ.get('QEMU_IMG_PROG', 'qemu-img')]
|
qemu_img_args = [os.environ.get('QEMU_IMG_PROG', 'qemu-img')]
|
||||||
|
|
Loading…
Reference in New Issue