qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, John Snow <jsnow@redhat.com>,
	armbru@redhat.com, stefanha@redhat.com, mst@redhat.com
Subject: [Qemu-devel] [PATCH v2 5/6] qtest/bios-tables: Correct Q35 command line
Date: Mon, 29 Sep 2014 12:47:17 -0400	[thread overview]
Message-ID: <1412009238-13530-6-git-send-email-jsnow@redhat.com> (raw)
In-Reply-To: <1412009238-13530-1-git-send-email-jsnow@redhat.com>

If the Q35 board types are to begin recognizing
and decoding syntactic sugar for drive/device
declarations, then workarounds found within
the qtests suite need to be adjusted to prevent
any test failures after the fix.

bios-tables-test improperly uses this cli:
-drive file=etc,id=hd -device ide-hd,drive=hd

Which will create a drive and device due to
the lack of specifying if=none. Then, it will
attempt to create a second device and fail.

This patch corrects this test to always use
the full, non-sugared -device/-drive syntax
for both PC and Q35.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/bios-tables-test.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 602932b..9e4d205 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -714,14 +714,12 @@ static void test_acpi_one(const char *params, test_data *data)
     uint8_t signature_high;
     uint16_t signature;
     int i;
-    const char *device = "";
 
-    if (!g_strcmp0(data->machine, MACHINE_Q35)) {
-        device = ",id=hd -device ide-hd,drive=hd";
-    }
+    args = g_strdup_printf("-net none -display none %s "
+                           "-drive id=hd0,if=none,file=%s "
+                           "-device ide-hd,drive=hd0 ",
+                           params ? params : "", disk);
 
-    args = g_strdup_printf("-net none -display none %s -drive file=%s%s,",
-                           params ? params : "", disk, device);
     qtest_start(args);
 
    /* Wait at most 1 minute */
-- 
1.9.3

  parent reply	other threads:[~2014-09-29 16:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29 16:47 [Qemu-devel] [PATCH v2 0/6] Q35: Implement -cdrom/-hda sugar John Snow
2014-09-29 16:47 ` [Qemu-devel] [PATCH v2 1/6] blockdev: Orphaned drive search John Snow
2014-09-29 16:47 ` [Qemu-devel] [PATCH v2 2/6] blockdev: Allow overriding if_max_dev property John Snow
2014-09-30  6:37   ` Markus Armbruster
2014-09-29 16:47 ` [Qemu-devel] [PATCH v2 3/6] pc/vl: Add units-per-default-bus property John Snow
2014-09-30  6:39   ` Markus Armbruster
2014-09-29 16:47 ` [Qemu-devel] [PATCH v2 4/6] ide: Update ide_drive_get to be HBA agnostic John Snow
2014-09-30  7:38   ` Markus Armbruster
2014-09-30 23:19     ` John Snow
2014-10-01  6:34       ` Markus Armbruster
2014-09-29 16:47 ` John Snow [this message]
2014-09-29 16:47 ` [Qemu-devel] [PATCH v2 6/6] q35/ahci: Pick up -cdrom and -hda options John Snow
2014-09-30  7:54   ` Markus Armbruster
2014-09-30 17:32     ` John Snow
2014-09-30  8:02 ` [Qemu-devel] [PATCH v2 0/6] Q35: Implement -cdrom/-hda sugar Markus Armbruster

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=1412009238-13530-6-git-send-email-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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 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).