qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 04/15] qemu-iotests: add option to attach gdbserver


From: Paolo Bonzini
Subject: Re: [PATCH v4 04/15] qemu-iotests: add option to attach gdbserver
Date: Wed, 26 May 2021 14:48:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 26/05/21 13:24, Vladimir Sementsov-Ogievskiy wrote:

Define -gdb flag and GDB_OPTIONS environment variable

Let's use --option notation for new long options

Why make a mix of two styles? -- suggests that single-character options like -d and -v can be combined, is that the case?

if -gdb is not provided but $GDB_OPTIONS is set, ignore the
environment variable.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
  tests/qemu-iotests/check      |  6 +++++-
  tests/qemu-iotests/iotests.py |  5 +++++
  tests/qemu-iotests/testenv.py | 19 ++++++++++++++++---
  3 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index d1c87ceaf1..b9820fdaaf 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -33,6 +33,9 @@ def make_argparser() -> argparse.ArgumentParser:
                     help='pretty print output for make check')
      p.add_argument('-d', dest='debug', action='store_true', help='debug')
+    p.add_argument('-gdb', action='store_true',
+                   help="start gdbserver with $GDB_OPTIONS options \
+                        ('localhost:12345' if $GDB_OPTIONS is empty)")

Hmm.. Why not just make --gdb a string option, that defaults to GDB_OPTIONS? This way it will more similar with other options.

I think then something like "./check -gdb 030" would not work, right?

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]