qemu-arm
[Top][All Lists]
Advanced

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

Re: Re: [PATCH v3 2/3] tests/tcg: Factor out gdbstub test functions


From: Ilya Leoshkevich
Subject: Re: Re: [PATCH v3 2/3] tests/tcg: Factor out gdbstub test functions
Date: Mon, 22 Jan 2024 22:08:35 +0100

On Mon, Jan 22, 2024 at 04:00:44PM +0000, Alex Bennée wrote:
> Ilya Leoshkevich <iii@linux.ibm.com> writes:
> 
> > Both the report() function as well as the initial gdbstub test sequence
> > are copy-pasted into ~10 files with slight modifications. This
> > indicates that they are indeed generic, so factor them out. While
> > at it, add a few newlines to make the formatting closer to PEP-8.
> >
> > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> > ---
> >  tests/guest-debug/run-test.py                 |  7 ++-
> >  tests/guest-debug/test_gdbstub.py             | 58 +++++++++++++++++++
> >  tests/tcg/aarch64/gdbstub/test-sve-ioctl.py   | 34 +----------
> >  tests/tcg/aarch64/gdbstub/test-sve.py         | 33 +----------
> >  tests/tcg/multiarch/gdbstub/interrupt.py      | 47 ++-------------
> >  tests/tcg/multiarch/gdbstub/memory.py         | 41 +------------
> >  tests/tcg/multiarch/gdbstub/registers.py      | 41 ++-----------
> >  tests/tcg/multiarch/gdbstub/sha1.py           | 40 ++-----------
> >  .../multiarch/gdbstub/test-proc-mappings.py   | 39 +------------
> >  .../multiarch/gdbstub/test-qxfer-auxv-read.py | 37 +-----------
> >  .../gdbstub/test-thread-breakpoint.py         | 37 +-----------
> >  tests/tcg/s390x/gdbstub/test-signals-s390x.py | 42 +-------------
> >  tests/tcg/s390x/gdbstub/test-svc.py           | 39 +------------
> >  13 files changed, 98 insertions(+), 397 deletions(-)
> >  create mode 100644 tests/guest-debug/test_gdbstub.py

[...]

> > +    if gdb.parse_and_eval("$pc") == 0:
> > +        print("SKIP: PC not set")
> > +        exit(0)
> > +
> > +    try:
> > +        test()
> > +    except:
> > +        print("GDB Exception:")
> > +        traceback.print_exc(file=sys.stdout)
> > +        global fail_count
> > +        fail_count += 1
> > +        import code
> > +        code.InteractiveConsole(locals=globals()).interact()
> > +        raise
> 
> While I can see this is useful we don't want to default to an
> interactive console as that will hang the test in CI type setups. Can we
> make this a option we enable?

Would something like `export QEMU_TEST_INTERACTIVE=1` be okay?

[...]



reply via email to

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