提交 9295cc60 编写于 作者: L Lukáš Doktor

pci_devices: Change the reserved addr format

The format of pci addr was changed to hex numbers with leading "0x" a
while ago, but this test was not adjusted resulting in reserved address
having unusable addresses. Let's adjust the format.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 1259cc04
...@@ -216,7 +216,7 @@ def add_device_usb(params, name_idxs, parent_bus, addr, device): ...@@ -216,7 +216,7 @@ def add_device_usb(params, name_idxs, parent_bus, addr, device):
params['usb_type_%s' % name] = device[1] params['usb_type_%s' % name] = device[1]
if not params.get('reserved_slots_%s' % parent_bus): if not params.get('reserved_slots_%s' % parent_bus):
params['reserved_slots_%s' % parent_bus] = "" params['reserved_slots_%s' % parent_bus] = ""
params['reserved_slots_%s' % parent_bus] += " %02x-00" % addr params['reserved_slots_%s' % parent_bus] += " 0x%x-0x0" % addr
logging.debug("Add test device %s %s %s addr:%s", name, device[1], logging.debug("Add test device %s %s %s addr:%s", name, device[1],
parent_bus, addr) parent_bus, addr)
return params, name_idxs return params, name_idxs
...@@ -263,7 +263,7 @@ def add_virtio_disk(params, name_idxs, parent_bus, addr): ...@@ -263,7 +263,7 @@ def add_virtio_disk(params, name_idxs, parent_bus, addr):
params['image_size_%s' % name] = '1M' params['image_size_%s' % name] = '1M'
if not params.get('reserved_slots_%s' % parent_bus): if not params.get('reserved_slots_%s' % parent_bus):
params['reserved_slots_%s' % parent_bus] = "" params['reserved_slots_%s' % parent_bus] = ""
params['reserved_slots_%s' % parent_bus] += " %02x-00" % addr params['reserved_slots_%s' % parent_bus] += " 0x%x-0x0" % addr
logging.debug("Add test device %s virtio_disk %s addr:%s", name, logging.debug("Add test device %s virtio_disk %s addr:%s", name,
parent_bus, addr) parent_bus, addr)
return params, name_idxs return params, name_idxs
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册