[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 12/13] fdc-test: Avoid deprecated 'change' co
From: |
John Snow |
Subject: |
Re: [Qemu-devel] [PATCH v3 12/13] fdc-test: Avoid deprecated 'change' command |
Date: |
Wed, 5 Apr 2017 16:52:18 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 04/05/2017 03:47 PM, Eric Blake wrote:
> Use the preferred blockdev-change-medium command instead.
>
> Admittedly, use of 'device' is also deprecated over the newer use
> of 'id', but the test is exploiting that the name 'floppy0' is
> auto-created by the board, and I could not figure out where the
> command line lives that would need to be tweaked to provide a
> non-random 'id' to this device.
>
qtest_start
qtest_init
qtest_init_without_qmp_handshake
You can give *extra* args to qtest_start, but depending on the board
-nodefaults isn't going to get rid of that embedded FDC nor its default
floppy0 drive, I think.
You could perhaps add a second floppy drive explicitly with
-device floppy,id=snafu,bus=floppy-bus.0,unit=1
and then interact with this non-default drive, or you could use Q35 and
-nodefaults to fully clear the isa-fdc, then re-add with
-device isa-fdc,id=foobar
-device floppy,bus=foobar.0,unit=1
Or you could do nothing, and I won't tell anyone.
--js
> Signed-off-by: Eric Blake <address@hidden>
> Reviewed-by: John Snow <address@hidden>
>
> ---
> v3: update commit message to point out that we are still using
> deprecated 'device'
> ---
> tests/fdc-test.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/fdc-test.c b/tests/fdc-test.c
> index 738c6b4..f5ff68d 100644
> --- a/tests/fdc-test.c
> +++ b/tests/fdc-test.c
> @@ -298,8 +298,9 @@ 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':{"
> + " 'device':'floppy0', 'filename': %s, "
> + "'format': 'raw' }}",
> test_image);
>
> dir = inb(FLOPPY_BASE + reg_dir);
>
- Re: [Qemu-devel] [PATCH v3 10/13] block: Simplify bdrv_append_temp_snapshot() logic, (continued)
[Qemu-devel] [PATCH v3 07/13] block: Use simpler QDict/QList scalar insertion macros, Eric Blake, 2017/04/05
[Qemu-devel] [PATCH v3 13/13] test-qga: Actually test 0xff sync bytes, Eric Blake, 2017/04/05
[Qemu-devel] [PATCH v3 12/13] fdc-test: Avoid deprecated 'change' command, Eric Blake, 2017/04/05
- Re: [Qemu-devel] [PATCH v3 12/13] fdc-test: Avoid deprecated 'change' command,
John Snow <=
[Qemu-devel] [PATCH v3 09/13] qobject: Use simpler QDict/QList scalar insertion macros, Eric Blake, 2017/04/05
Re: [Qemu-devel] [PATCH v3 00/13] qapi-related cleanups, no-reply, 2017/04/06
Re: [Qemu-devel] [PATCH v3 00/13] qapi-related cleanups, Markus Armbruster, 2017/04/11