[libvirt] [PATCH 3/5] DO NOT APPLY: Simple reproducer

Peter Krempa pkrempa at redhat.com
Tue Mar 12 15:26:11 UTC 2019


On Tue, Mar 12, 2019 at 16:13:18 +0100, Michal Privoznik wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1623389
> 
> Steps to reproduce:
> 
> 1) cat shmem.xml
>     <shmem name='my_shmem0'>
>       <model type='ivshmem-plain'/>
>       <size unit='M'>4</size>
>       <alias name='ua-123'/>
>     </shmem>
> 
> 2) virsh attach-device vm1 shmem.xml
> 
> 3) virsh detach-device-alias vm1 ua-123; virsh detach-device vm1 shmem.xml
> 
> 4) observe that the device is still in the domain:
>    virsh dumpxml vm1
>     <shmem name='my_shmem0'>
>       <model type='ivshmem-plain'/>
>       <size unit='M'>4</size>
>       <alias name='ua-123'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
>     </shmem>
> 
> 5) But qemu has the device no more:
>    virsh detach-device-alias vm1 ua-123
>    error: Failed to detach device with alias ua-123
>    error: internal error: unable to execute QEMU command 'device_del': Device 'ua-123' not found
> 
> This reproducer is to make sure that DELETE_DEVICE event arrives
> while monitor is unlocked. It is very hard to time qemu and
> libvirt so that the event comes exactly at the time when
> detach-device from 3) is doing the monitor call. Simulate this by
> unlocking monitor, waiting a few seconds and locking the monitor
> again.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>

I strongly suggest to not add sign-off to patches which are not meant to
be pushed. This will actually make the otherwise useless sign-off
somewhat usefull as the push-hook will reject pushing such a series.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190312/5805f235/attachment-0001.sig>


More information about the libvir-list mailing list