All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
Cc: eduardo@habkost.net, thuth@redhat.com, berrange@redhat.com,
	quintela@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: Re: [PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests
Date: Thu, 17 Feb 2022 03:18:59 -0500	[thread overview]
Message-ID: <20220217031836-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220215162537.605030-2-dgilbert@redhat.com>

On Tue, Feb 15, 2022 at 04:25:31PM +0000, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> For tests that rely on old hardware, e.g. floppies or IDE drives,
> explicitly select the 'pc' machine type.
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

This makes sense regardless of the rest of the series.

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  tests/qtest/fdc-test.c    |  2 +-
>  tests/qtest/hd-geo-test.c | 12 +++++++++---
>  tests/qtest/i440fx-test.c |  2 +-
>  tests/qtest/ide-test.c    |  3 ++-
>  4 files changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/qtest/fdc-test.c b/tests/qtest/fdc-test.c
> index 8f6eee84a4..b0d40012e6 100644
> --- a/tests/qtest/fdc-test.c
> +++ b/tests/qtest/fdc-test.c
> @@ -598,7 +598,7 @@ int main(int argc, char **argv)
>      /* Run the tests */
>      g_test_init(&argc, &argv, NULL);
>  
> -    qtest_start("-device floppy,id=floppy0");
> +    qtest_start("-machine pc -device floppy,id=floppy0");
>      qtest_irq_intercept_in(global_qtest, "ioapic");
>      qtest_add_func("/fdc/cmos", test_cmos);
>      qtest_add_func("/fdc/no_media_on_start", test_no_media_on_start);
> diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c
> index 771eaa741b..3554b5d500 100644
> --- a/tests/qtest/hd-geo-test.c
> +++ b/tests/qtest/hd-geo-test.c
> @@ -178,9 +178,15 @@ static int append_arg(int argc, char *argv[], int argv_sz, char *arg)
>  
>  static int setup_common(char *argv[], int argv_sz)
>  {
> +    int new_argc;
>      memset(cur_ide, 0, sizeof(cur_ide));
> -    return append_arg(0, argv, argv_sz,
> -                      g_strdup("-nodefaults"));
> +    new_argc = append_arg(0, argv, argv_sz,
> +                          g_strdup("-nodefaults"));
> +    new_argc = append_arg(new_argc, argv, argv_sz,
> +                          g_strdup("-machine"));
> +    new_argc = append_arg(new_argc, argv, argv_sz,
> +                          g_strdup("pc"));
> +    return new_argc;
>  }
>  
>  static void setup_mbr(int img_idx, MBRcontents mbr)
> @@ -697,7 +703,7 @@ static void test_override(TestArgs *args, CHSResult expected[])
>  
>      joined_args = g_strjoinv(" ", args->argv);
>  
> -    qts = qtest_init(joined_args);
> +    qts = qtest_initf("-machine pc %s", joined_args);
>      fw_cfg = pc_fw_cfg_init(qts);
>  
>      read_bootdevices(fw_cfg, expected);
> diff --git a/tests/qtest/i440fx-test.c b/tests/qtest/i440fx-test.c
> index 1f57d9684b..6d7d4d8d8f 100644
> --- a/tests/qtest/i440fx-test.c
> +++ b/tests/qtest/i440fx-test.c
> @@ -35,7 +35,7 @@ static QPCIBus *test_start_get_bus(const TestData *s)
>  {
>      char *cmdline;
>  
> -    cmdline = g_strdup_printf("-smp %d", s->num_cpus);
> +    cmdline = g_strdup_printf("-machine pc -smp %d", s->num_cpus);
>      qtest_start(cmdline);
>      g_free(cmdline);
>      return qpci_new_pc(global_qtest, NULL);
> diff --git a/tests/qtest/ide-test.c b/tests/qtest/ide-test.c
> index 3f8081e77d..84935578fb 100644
> --- a/tests/qtest/ide-test.c
> +++ b/tests/qtest/ide-test.c
> @@ -128,10 +128,11 @@ static char debug_path[] = "/tmp/qtest-blkdebug.XXXXXX";
>  static QTestState *ide_test_start(const char *cmdline_fmt, ...)
>  {
>      QTestState *qts;
> +    g_autofree char *full_fmt = g_strdup_printf("-machine pc %s", cmdline_fmt);
>      va_list ap;
>  
>      va_start(ap, cmdline_fmt);
> -    qts = qtest_vinitf(cmdline_fmt, ap);
> +    qts = qtest_vinitf(full_fmt, ap);
>      va_end(ap);
>  
>      pc_alloc_init(&guest_malloc, qts, 0);
> -- 
> 2.35.1



  parent reply	other threads:[~2022-02-17  9:08 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 16:25 [PATCH 0/3] x86: Switch over to q35 as the default machine type Dr. David Alan Gilbert (git)
2022-02-15 16:25 ` [PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests Dr. David Alan Gilbert (git)
2022-02-17  8:04   ` Thomas Huth
2022-02-17  8:18   ` Michael S. Tsirkin [this message]
2022-02-15 16:25 ` [PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests Dr. David Alan Gilbert (git)
2022-02-17  8:09   ` Thomas Huth
2022-02-17  8:18   ` Michael S. Tsirkin
2022-02-15 16:25 ` [PATCH 3/3] x86: Switch to q35 as the default machine type Dr. David Alan Gilbert (git)
2022-02-15 18:13   ` Daniel P. Berrangé
2022-02-15 18:29     ` Dr. David Alan Gilbert
2022-02-16 10:58     ` Gerd Hoffmann
2022-02-16 11:01       ` Dr. David Alan Gilbert
2022-02-16 11:23         ` Daniel P. Berrangé
2022-02-16 11:24         ` Thomas Huth
2022-02-16 17:40           ` Dr. David Alan Gilbert
2022-02-16 17:48             ` Daniel P. Berrangé
2022-02-16 17:57               ` Dr. David Alan Gilbert
2022-02-17  7:46                 ` Thomas Huth
2022-02-17  7:52                   ` Michael S. Tsirkin
2022-02-17  9:29                 ` Daniel P. Berrangé
2022-02-17  9:43                   ` Dr. David Alan Gilbert
2022-02-17  7:57             ` Thomas Huth
2022-02-17  8:08               ` Gerd Hoffmann
2022-02-17  8:17                 ` Michael S. Tsirkin
2022-02-17  9:16                   ` Daniel P. Berrangé
2022-02-17  9:35                   ` Igor Mammedov
2022-02-17  9:19               ` Kashyap Chamarthy
2022-02-15 16:25 ` [PATCH 0/3] x86: Switch over " Dr. David Alan Gilbert (git)
2022-02-15 16:25 ` [PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests Dr. David Alan Gilbert (git)
2022-02-15 16:25 ` [PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests Dr. David Alan Gilbert (git)
2022-02-15 16:25 ` [PATCH 3/3] x86: Switch to q35 as the default machine type Dr. David Alan Gilbert (git)

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=20220217031836-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@redhat.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.