From nobody Mon Apr 28 23:26:25 2025
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as
 permitted sender) client-ip=208.118.235.17;
 envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org;
 helo=lists.gnu.org;
Authentication-Results: mx.zohomail.com;
	spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted
 sender)  smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org
Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org>
Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by
 mx.zohomail.com
	with SMTPS id 1516716519829454.00680891756735;
 Tue, 23 Jan 2018 06:08:39 -0800 (PST)
Received: from localhost ([::1]:59741 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <qemu-devel-bounces+importer=patchew.org@nongnu.org>)
	id 1edzFf-00083j-28
	for importer@patchew.org; Tue, 23 Jan 2018 09:08:39 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57748)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <kwolf@redhat.com>) id 1edz9o-0003WQ-OZ
	for qemu-devel@nongnu.org; Tue, 23 Jan 2018 09:02:43 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <kwolf@redhat.com>) id 1edz9k-0005sf-Se
	for qemu-devel@nongnu.org; Tue, 23 Jan 2018 09:02:36 -0500
Received: from mx1.redhat.com ([209.132.183.28]:57290)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <kwolf@redhat.com>)
	id 1edz9V-0005hK-Rn; Tue, 23 Jan 2018 09:02:17 -0500
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com
	[10.5.11.12])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.redhat.com (Postfix) with ESMTPS id 01D7FC09943B;
	Tue, 23 Jan 2018 14:02:17 +0000 (UTC)
Received: from localhost.localdomain.com (ovpn-117-26.ams2.redhat.com
	[10.36.117.26])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 0F5C08517;
	Tue, 23 Jan 2018 14:02:15 +0000 (UTC)
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Date: Tue, 23 Jan 2018 15:01:39 +0100
Message-Id: <20180123140201.31163-8-kwolf@redhat.com>
In-Reply-To: <20180123140201.31163-1-kwolf@redhat.com>
References: <20180123140201.31163-1-kwolf@redhat.com>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(mx1.redhat.com [10.5.110.31]);
	Tue, 23 Jan 2018 14:02:17 +0000 (UTC)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 209.132.183.28
Subject: [Qemu-devel] [PULL 07/29] tests/ahci: Switch tray and medium
 commands to @id
X-BeenThere: qemu-devel@nongnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <qemu-devel.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>,
	<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/>
List-Post: <mailto:qemu-devel@nongnu.org>
List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>,
	<mailto:qemu-devel-request@nongnu.org?subject=subscribe>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org
Sender: "Qemu-devel" <qemu-devel-bounces+importer=patchew.org@nongnu.org>
X-ZohoMail: RSF_0  Z_629925259 SPT_0
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"

From: Max Reitz <mreitz@redhat.com>

Currently, the tray and medium commands in the AHCI test use the
deprecated @device parameter.  This patch switches all invocations over
to use @id.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20171110224302.14424-3-mreitz@redhat.com
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/ahci-test.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/ahci-test.c b/tests/ahci-test.c
index cb84edc8fb..3635ea6d41 100644
--- a/tests/ahci-test.c
+++ b/tests/ahci-test.c
@@ -1578,9 +1578,9 @@ static void test_atapi_tray(void)
     QDict *rsp;
=20
     fd =3D prepare_iso(iso_size, &tx, &iso);
-    ahci =3D ahci_boot_and_enable("-drive if=3Dnone,id=3Ddrive0,file=3D%s,=
format=3Draw "
+    ahci =3D ahci_boot_and_enable("-blockdev node-name=3Ddrive0,driver=3Df=
ile,filename=3D%s "
                                 "-M q35 "
-                                "-device ide-cd,drive=3Ddrive0 ", iso);
+                                "-device ide-cd,id=3Dcd0,drive=3Ddrive0 ",=
 iso);
     port =3D ahci_port_select(ahci);
=20
     ahci_atapi_eject(ahci, port);
@@ -1591,13 +1591,13 @@ static void test_atapi_tray(void)
=20
     /* Remove media */
     qmp_async("{'execute': 'blockdev-open-tray', "
-               "'arguments': {'device': 'drive0'}}");
+               "'arguments': {'id': 'cd0'}}");
     atapi_wait_tray(true);
     rsp =3D qmp_receive();
     QDECREF(rsp);
=20
     qmp_discard_response("{'execute': 'x-blockdev-remove-medium', "
-                         "'arguments': {'device': 'drive0'}}");
+                         "'arguments': {'id': 'cd0'}}");
=20
     /* Test the tray without a medium */
     ahci_atapi_load(ahci, port);
@@ -1613,12 +1613,12 @@ static void test_atapi_tray(void)
                                         "'file': { 'driver': 'file', "
                                                   "'filename': %s }}}", is=
o);
     qmp_discard_response("{'execute': 'x-blockdev-insert-medium',"
-                          "'arguments': { 'device': 'drive0', "
+                          "'arguments': { 'id': 'cd0', "
                                          "'node-name': 'node0' }}");
=20
     /* Again, the event shows up first */
     qmp_async("{'execute': 'blockdev-close-tray', "
-               "'arguments': {'device': 'drive0'}}");
+               "'arguments': {'id': 'cd0'}}");
     atapi_wait_tray(false);
     rsp =3D qmp_receive();
     QDECREF(rsp);
--=20
2.13.6