[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH] cpus: Fix event order on resume of
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH] cpus: Fix event order on resume of stopped guest |
Date: |
Thu, 3 May 2018 14:47:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 03/05/2018 14:17, Markus Armbruster wrote:
>>> 4. Connect to the QMP socket e.g. like this:
>>> $ socat UNIX:/your/qmp/socket
>>> READLINE,history=$HOME/.qmp_history,prompt='QMP> '
>>>
>>> Issue QMP command 'qmp_capabilities':
>>> QMP> { "execute": "qmp_capabilities" }
>>>
>>> 5. Boot the guest.
>>>
>>> 6. In the guest, write to the scratch disk, e.g. like this:
>>>
>>> # dd if=/dev/zero of=/dev/vdb count=1
>>>
>>> Do double-check the device specified with of= is actually the
>>> scratch device!
>>>
>>> 7. Issue QMP command 'cont':
>>> QMP> { "execute": "cont" }
>>>
>>> After step 6, I get a BLOCK_IO_ERROR event followed by a STOP event. Good.
>>>
>>> After step 7, I get BLOCK_IO_ERROR, then RESUME, then STOP. Not so
>>> good; I'd expect RESUME, then BLOCK_IO_ERROR, then STOP.
>> Do you want to rephrase this in the form of a script for qemu-iotests?
>>
>> I suppose the 'dd' line can be replaced by a 'qemu-io' monitor command.
> Uh, can it? With qemu-io, the write doesn't stop the guest, because it
> bypasses the device model, and thus blk_error_action(). I'm not aware
> of ways to make qemu-iotests write via a device model. I'm afraid we
> need a full-fledged qtest. Better ideas?
Yeah, using virtio-blk-test sounds like a good idea.
Paolo