qtree parser stubles over a duplicate id here:
dev: kvm-apic, id ""
id = 1
vapic = on
irq 0
mmio ffffffffffffffff/0000000000100000
Bad idea on qemu side to do that in the first place, should
better be named 'apic-id' (simliar to scsi-id).
This patch adds a workaround for it: ignore empty id strings.
Looked like the least hacky way to fix the issue at hand.
Signed-off-by: Gerd Hoffmann <[email protected]>
---
client/virt/kvm_qtree.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/client/virt/kvm_qtree.py b/client/virt/kvm_qtree.py
index 2b06fd1..64ebb9d 100644
--- a/client/virt/kvm_qtree.py
+++ b/client/virt/kvm_qtree.py
@@ -286,7 +286,9 @@ class QtreeContainer(object):
new.set_parent(current)
current = new
line = line[5:].split(',')
- current.set_qtree_prop('id', line[1][5:-1])
+ id = line[1][5:-1]
+ if len(id) > 0:
+ current.set_qtree_prop('id', line[1][5:-1])
offset += OFFSET_PER_LEVEL
line = ['type', line[0]]
elif _RE_CLASS.match(line):
--
1.7.1
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest