diff options
| author | Emanuele Giuseppe Esposito <eesposit@redhat.com> | 2021-08-09 11:01:03 +0200 |
|---|---|---|
| committer | Hanna Reitz <hreitz@redhat.com> | 2021-09-01 12:57:31 +0200 |
| commit | cfb9b0b731ff86f71fd8602be0da1e064795c7ce (patch) | |
| tree | d89b4e9c7e7121668837e5963b94af18d9f76ae3 /tests/qemu-iotests/iotests.py | |
| parent | 0193767b25340ac6ea6e6ecfbc0c3d1c25c153ef (diff) | |
| download | focaccia-qemu-cfb9b0b731ff86f71fd8602be0da1e064795c7ce.tar.gz focaccia-qemu-cfb9b0b731ff86f71fd8602be0da1e064795c7ce.zip | |
qemu-iotests: add option to attach gdbserver
Define -gdb flag and GDB_OPTIONS environment variable to python tests to attach a gdbserver to each qemu instance. This patch only adds and parses this flag, it does not yet add the implementation for it. if -gdb is not provided but $GDB_OPTIONS is set, ignore the environment variable. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210809090114.64834-6-eesposit@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
| -rw-r--r-- | tests/qemu-iotests/iotests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 6b0db4ce54..c86f239d81 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -74,6 +74,11 @@ if os.environ.get('QEMU_NBD_OPTIONS'): qemu_prog = os.environ.get('QEMU_PROG', 'qemu') qemu_opts = os.environ.get('QEMU_OPTIONS', '').strip().split(' ') +gdb_qemu_env = os.environ.get('GDB_OPTIONS') +qemu_gdb = [] +if gdb_qemu_env: + qemu_gdb = ['gdbserver'] + gdb_qemu_env.strip().split(' ') + imgfmt = os.environ.get('IMGFMT', 'raw') imgproto = os.environ.get('IMGPROTO', 'file') output_dir = os.environ.get('OUTPUT_DIR', '.') |