qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PULL 07/11] readconfig-test: add test for accelerator configuration
Date: Thu, 9 Feb 2023 06:21:32 +0100	[thread overview]
Message-ID: <905f792c-bac7-f88f-a538-b5c10135944d@redhat.com> (raw)
In-Reply-To: <20230208171922.95048-8-pbonzini@redhat.com>

On 08/02/2023 18.19, Paolo Bonzini wrote:
> Test that it does not cause a SIGSEGV, and cover a valid configuration
> as well.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   tests/qtest/libqtest.c        | 28 +++++++++++++++++-----
>   tests/qtest/libqtest.h        | 12 ++++++++++
>   tests/qtest/readconfig-test.c | 45 ++++++++++++++++++++++++++++-------
>   3 files changed, 70 insertions(+), 15 deletions(-)
> 
> diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
> index ce5f235e25f1..4fba2bb27f06 100644
> --- a/tests/qtest/libqtest.c
> +++ b/tests/qtest/libqtest.c
> @@ -420,6 +420,26 @@ static QTestState *G_GNUC_PRINTF(1, 2) qtest_spawn_qemu(const char *fmt, ...)
>       return s;
>   }
>   
> +QTestState *G_GNUC_PRINTF(1, 0) qtest_init_bare(const char *args)
> +{
> +    QTestState *s = qtest_spawn_qemu("%s", args);
> +
> +    /*
> +     * Stopping QEMU for debugging is not supported on Windows.
> +     *
> +     * Using DebugActiveProcess() API can suspend the QEMU process,
> +     * but gdb cannot attach to the process. Using the undocumented
> +     * NtSuspendProcess() can suspend the QEMU process and gdb can
> +     * attach to the process, but gdb cannot resume it.
> +     */
> +#ifndef _WIN32
> +    if (getenv("QTEST_STOP")) {
> +        kill(s->qemu_pid, SIGSTOP);
> +    }
> +#endif
> +    return s;
> +}

You missed my review comments here:

https://lore.kernel.org/qemu-devel/2f17c06f-90a9-9bac-8e9a-a1a2842665d2@redhat.com/

  Thomas



  reply	other threads:[~2023-02-09  5:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 17:19 [PULL 00/11] Misc patches for 2022-02-08 Paolo Bonzini
2023-02-08 17:19 ` [PULL 01/11] build: make meson-buildoptions.sh stable Paolo Bonzini
2023-02-08 17:19 ` [PULL 02/11] remove unnecessary extern "C" blocks Paolo Bonzini
2023-02-08 17:19 ` [PULL 03/11] block/iscsi: fix double-free on BUSY or similar statuses Paolo Bonzini
2023-02-21 12:15   ` Fiona Ebner
2023-02-08 17:19 ` [PULL 04/11] vl: catch [accel] entry without accelerator Paolo Bonzini
2023-02-08 17:19 ` [PULL 05/11] libqtest: split qtest_spawn_qemu function Paolo Bonzini
2023-02-08 17:19 ` [PULL 06/11] libqtest: ensure waitpid() is only called once Paolo Bonzini
2023-02-08 17:19 ` [PULL 07/11] readconfig-test: add test for accelerator configuration Paolo Bonzini
2023-02-09  5:21   ` Thomas Huth [this message]
2023-02-09  9:01     ` Paolo Bonzini
2023-02-08 17:19 ` [PULL 08/11] tests/tcg/i386: Introduce and use reg_t consistently Paolo Bonzini
2023-02-08 17:19 ` [PULL 09/11] target/i386: Fix BEXTR instruction Paolo Bonzini
2023-02-10 10:23   ` Michael Tokarev
2023-02-08 17:19 ` [PULL 10/11] target/i386: Fix C flag for BLSI, BLSMSK, BLSR Paolo Bonzini
2023-02-08 17:19 ` [PULL 11/11] target/i386: fix ADOX followed by ADCX Paolo Bonzini
2023-02-09  5:19 ` [PULL 00/11] Misc patches for 2022-02-08 Thomas Huth
2023-02-09  7:09   ` Philippe Mathieu-Daudé
2023-02-09  9:02     ` Paolo Bonzini

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=905f792c-bac7-f88f-a538-b5c10135944d@redhat.com \
    --to=thuth@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).