qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 11/28] fdc-test: Avoid deprecated 'change' command
Date: Thu,  4 May 2017 17:23:48 +0200	[thread overview]
Message-ID: <1493911445-19568-12-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1493911445-19568-1-git-send-email-armbru@redhat.com>

From: Eric Blake <eblake@redhat.com>

Use the preferred blockdev-change-medium command instead.

Also, use of 'device' is deprecated; adding an explicit id on
the command line lets us use 'id' for both blockdev-change-medium
and eject.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20170427215821.19397-10-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 tests/fdc-test.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/fdc-test.c b/tests/fdc-test.c
index 738c6b4..325712e 100644
--- a/tests/fdc-test.c
+++ b/tests/fdc-test.c
@@ -298,8 +298,8 @@ static void test_media_insert(void)
 
     /* Insert media in drive. DSKCHK should not be reset until a step pulse
      * is sent. */
-    qmp_discard_response("{'execute':'change', 'arguments':{"
-                         " 'device':'floppy0', 'target': %s, 'arg': 'raw' }}",
+    qmp_discard_response("{'execute':'blockdev-change-medium', 'arguments':{"
+                         " 'id':'floppy0', 'filename': %s, 'format': 'raw' }}",
                          test_image);
 
     dir = inb(FLOPPY_BASE + reg_dir);
@@ -330,7 +330,7 @@ static void test_media_change(void)
     /* Eject the floppy and check that DSKCHG is set. Reading it out doesn't
      * reset the bit. */
     qmp_discard_response("{'execute':'eject', 'arguments':{"
-                         " 'device':'floppy0' }}");
+                         " 'id':'floppy0' }}");
 
     dir = inb(FLOPPY_BASE + reg_dir);
     assert_bit_set(dir, DSKCHG);
@@ -564,7 +564,7 @@ int main(int argc, char **argv)
     /* Run the tests */
     g_test_init(&argc, &argv, NULL);
 
-    qtest_start(NULL);
+    qtest_start("-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);
-- 
2.7.4

  parent reply	other threads:[~2017-05-04 15:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 15:23 [Qemu-devel] [PULL 00/28] QAPI patches for 2017-05-04 Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 01/28] tests/check-qdict: Fix missing brackets Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 02/28] test-keyval: fix leaks Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 03/28] pci: Use struct instead of QDict to pass back parameters Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 04/28] pci: Reduce scope of error injection Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 05/28] coccinelle: Add script to remove useless QObject casts Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 06/28] qobject: Drop " Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 07/28] qobject: Add helper macros for common scalar insertions Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 08/28] qobject: Use simpler QDict/QList scalar insertion macros Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 09/28] block: Simplify bdrv_append_temp_snapshot() logic Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 10/28] QemuOpts: Simplify qemu_opts_to_qdict() Markus Armbruster
2017-05-04 15:23 ` Markus Armbruster [this message]
2017-05-04 15:23 ` [Qemu-devel] [PULL 12/28] test-qga: Actually test 0xff sync bytes Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 13/28] sockets: Prepare vsock_parse() for flattened SocketAddress Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 14/28] sockets: Prepare inet_parse() " Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 15/28] qapi: New QAPI_CLONE_MEMBERS() Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 16/28] sockets: Rename SocketAddress to SocketAddressLegacy Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 17/28] sockets: Rename SocketAddressFlat to SocketAddress Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 18/28] sockets: Limit SocketAddressLegacy to external interfaces Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 19/28] sockets: Delete unused helper socket_address_crumple() Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 20/28] qmp: Improve QMP dispatch error messages Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 21/28] qobject-input-visitor: Document full_name_nth() Markus Armbruster
2017-05-04 15:23 ` [Qemu-devel] [PULL 22/28] qapi: Document intended use of @name within alternate visits Markus Armbruster
2017-05-04 15:24 ` [Qemu-devel] [PULL 23/28] qobject-input-visitor: Catch misuse of end_struct vs. end_list Markus Armbruster
2017-05-04 15:24 ` [Qemu-devel] [PULL 24/28] qmp-shell: add persistent command history Markus Armbruster
2017-05-04 15:24 ` [Qemu-devel] [PULL 25/28] qmp-shell: add -N option to skip negotiate Markus Armbruster
2017-05-04 15:24 ` [Qemu-devel] [PULL 26/28] qmp-shell: Cope with query-commands error Markus Armbruster
2017-05-04 15:24 ` [Qemu-devel] [PULL 27/28] qmp-shell: don't show version greeting if unavailable Markus Armbruster
2017-05-04 15:24 ` [Qemu-devel] [PULL 28/28] qmp-shell: improve help Markus Armbruster
2017-05-04 16:38 ` [Qemu-devel] [PULL 00/28] QAPI patches for 2017-05-04 no-reply

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=1493911445-19568-12-git-send-email-armbru@redhat.com \
    --to=armbru@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).