[libvirt] [PATCH 10/10] qemu: report error when shmem have a invalid address

Martin Kletzander mkletzan at redhat.com
Wed Jul 8 14:30:54 UTC 2015

On Wed, Jul 08, 2015 at 02:22:36PM +0200, Martin Kletzander wrote:
>On Wed, Jun 17, 2015 at 11:56:21AM +0800, Luyao Huang wrote:
>>If user pass a invalid address shared memory device
>>to qemu, qemu won't report the error, but will auto
>>assign a pci address to the shared memory device.
>>Signed-off-by: Luyao Huang <lhuang at redhat.com>
>>src/qemu/qemu_command.c | 7 +++++++
>>1 file changed, 7 insertions(+)

I also added a test case for this particular patch and pushed it along
with the other ACK'd ones.

The test case diff squashed in:

diff --git c/tests/qemuxml2argvdata/qemuxml2argv-shmem-msi-only.xml i/tests/qemuxml2argvdata/qemuxml2argv-shmem-invalid-address.xml
similarity index 95%
copy from tests/qemuxml2argvdata/qemuxml2argv-shmem-msi-only.xml
copy to tests/qemuxml2argvdata/qemuxml2argv-shmem-invalid-address.xml
index d70279c21faa..8a4e56d5926a 100644
--- c/tests/qemuxml2argvdata/qemuxml2argv-shmem-msi-only.xml
+++ i/tests/qemuxml2argvdata/qemuxml2argv-shmem-invalid-address.xml
@@ -18,7 +18,7 @@
     <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='none'/>
     <shmem name='shmem0'>
-      <msi/>
+      <address type='isa'/>
diff --git c/tests/qemuxml2argvtest.c i/tests/qemuxml2argvtest.c
index bee66372767b..24c1f301e4b9 100644
--- c/tests/qemuxml2argvtest.c
+++ i/tests/qemuxml2argvtest.c
@@ -1614,6 +1614,8 @@ mymain(void)
     DO_TEST_FAILURE("shmem", NONE);
     DO_TEST_FAILURE("shmem-invalid-size", QEMU_CAPS_PCIDEVICE,
+    DO_TEST_FAILURE("shmem-invalid-address", QEMU_CAPS_PCIDEVICE,
     DO_TEST_FAILURE("shmem-small-size", QEMU_CAPS_PCIDEVICE,
     DO_TEST_PARSE_ERROR("shmem-msi-only", NONE);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150708/1175aec3/attachment-0001.sig>

More information about the libvir-list mailing list