[libvirt] [PATCH v2] qemuhotplugtest: Add tests for ccw devices

Tomasz Flendrich t.flendrich at gmail.com
Thu Jul 21 18:38:17 UTC 2016


>> […]
> 
> But the problem is that you are not checking any assignment.  The code
> is not executed at all.  That's because you specify 'target dev=' from
> which we're trying to guess the right address.
> 
> Because virDomainDeviceDefPostParseInternal() is ran for the device
> definition and it calls virDomainDiskDefAssignAddress() which in turn
> calls virDiskNameToIndex().

virDomainDiskDefAssignAddress() is called only when disk->info.type
is VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE, and in my testcases,
disk->info.type is equal to VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW,
so this function isn’t even executed. Besides even if it went inside that function,
this device’s bus is set to VIR_DOMAIN_DISK_BUS_VIRTIO, so this function
wouldn’t do anything, because it deals only with buses that are controller-based.

To make sure, I confirmed that it is virDomainCCWAddressAssign()
that assigns addresses in my testcases. I checked that the parameters
are correct (autoassign is false when the address is explicit etc), and this
is what I wanted to test.
Thanks for the heads up though!

Tomasz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160721/9582df58/attachment-0001.htm>


More information about the libvir-list mailing list