# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1234428234 28800
# Node ID 7948c996ba56f86e2791a0d46d5f69266fa2ed8c
# Parent 0daae14ce5848711408fdd465fd2c03f20314466
[TEST] Fix DiskRASD and InputRASD verification for LXC
1) Set test_disk as '/tmp' for LXC
2) Return XFAIL_RC when libvirt allows the user to specify a mouse with "xen"
bus type for LXC
Tested for KVM/LXC with current sources
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r 0daae14ce584 -r 7948c996ba56
suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Wed Feb
11 21:00:52 2009 -0200
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Thu Feb
12 00:43:54 2009 -0800
@@ -54,8 +54,9 @@
from XenKvmLib.rasd import InstId_err
from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS
from XenKvmLib.const import do_main
-from CimTest.ReturnCodes import PASS, FAIL
+from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
+bug_libvirt = "00009"
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
test_dom = "VSSDC_dom"
@@ -66,7 +67,7 @@
def check_rasd_values(id, exp_id):
try:
if id != exp_id:
- InstId_err(assoc_info[i], rasd_list['proc_rasd'])
+ logger.error("Returned %s instead of %s", id, exp_id)
return FAIL
except Exception, detail :
@@ -127,6 +128,8 @@
elif inst.classname == input_cn:
status = check_rasd_values(inst['InstanceID'],
rasd_list['input_rasd'])
+ if status == FAIL and virt == "LXC":
+ return XFAIL_RC(bug_libvirt)
elif inst.classname == grap_cn:
status = check_rasd_values(inst['InstanceID'],
rasd_list['grap_rasd'])
@@ -154,6 +157,8 @@
global test_disk
if options.virt == "Xen":
test_disk = "xvdb"
+ elif options.virt == "LXC":
+ test_disk = "/tmp"
else:
test_disk = "hdb"