From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZfzX-0001N9-Li for qemu-devel@nongnu.org; Thu, 02 Oct 2014 09:00:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZfzR-00044B-6N for qemu-devel@nongnu.org; Thu, 02 Oct 2014 09:00:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZfzQ-000444-TF for qemu-devel@nongnu.org; Thu, 02 Oct 2014 09:00:13 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s92D0BWG021623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 2 Oct 2014 09:00:12 -0400 Date: Thu, 2 Oct 2014 16:03:39 +0300 From: "Michael S. Tsirkin" Message-ID: <20141002130339.GB25927@redhat.com> References: <1412187569-23452-1-git-send-email-jsnow@redhat.com> <1412187569-23452-6-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1412187569-23452-6-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 5/6] qtest/bios-tables: Correct Q35 command line List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com On Wed, Oct 01, 2014 at 02:19:28PM -0400, John Snow wrote: > 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 Reviewed-by: Michael S. Tsirkin > --- > 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