All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Robert Henry <robhenry@microsoft.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: Failure of test 'basic gdbstub support'
Date: Wed, 10 Jun 2020 17:21:47 +0100	[thread overview]
Message-ID: <87sgf251t0.fsf@linaro.org> (raw)
In-Reply-To: <BL0PR2101MB1026A0AC34665437F4B7D4FED6820@BL0PR2101MB1026.namprd21.prod.outlook.com>


Robert Henry <robhenry@microsoft.com> writes:

> The newish test 'basic gdbstub support' fails for me on an out-of-the-box  build on a host x86_64.  (See below for the config.log head.)
>
> Is this failure expected?  If so, where can I see that in the various
> CI engines you have running them?

No it shouldn't fail - if the GDB doesn't attach we should be skipping
the test.

>
> In digging through the test driver python code in tests/tcg/multiarch/gdbstub/sha1.py I see that the test assumes that a breakpoint on the function SHA1Init is a breakpoint at the 1st assignment statement; the 1st next executes the 1st assignment statement, etc.
>
> This is a very fragile assumption.  It depends on the compiler used to
> compile sha1.c;

True - certainly for "native" built test images.

>it depends on the optimization level; it depends on the accuracy of the
>pc mapping in the debug info;

All test cases are built -O0 -g3 so should have full debug info.

>it depends on gdb.

This is out biggest problem at the moment because it seems support for
socket based debug is fairly new for gdb.

>
> Better would be to change SHA1Init to do its work, and then call
> another non-inlined function taking a context pointer, and then
> examine context->state[0] and context->state[1].

We are also trying to test the step and next functionality is working
here.

>
> Thanks in advance
>
> TEST    basic gdbstub support
> make[2]: ***
> [/mnt/robhenry/qemu_robhenry_amd64/qemu/tests/tcg/multiarch/Makefile.target:51:
> run-gdbstub-sha1] Error 2

Can you let me know what the contents of:

  cat tests/tcg/x86_64-linux-user/run-gdbstub-sha1.out

is please?
>
>  QEMU configure log Tue 09 Jun 2020 02:45:06 PM PDT
> # Configured with: '../configure' '--disable-sdl' '--enable-gtk' '--extra-ldflags=-L/usr/lib' '--enable-plugins' '--target-list=x86_64-softmmu x86_64-linux-user'


-- 
Alex Bennée


      reply	other threads:[~2020-06-10 16:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 14:39 Failure of test 'basic gdbstub support' Robert Henry
2020-06-10 16:21 ` Alex Bennée [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgf251t0.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=robhenry@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.