On Thu, Jul 21, 2016 at 08:38:17PM +0200, Tomasz Flendrich wrote:
>> […]
>
> 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,
Oh, that's right. I'm sorry for the confusion. I'll go through that
again and review it asap.
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.
Those damn ccw addresses =) I need to forget what I know about other
ones for a while.
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