
The number of expected RASDs for the test domain was incorrectly computed by enumerating all RASDs on the hypervisor which will always fail if the test domain doesn't have every possible RASD associated. Fixed by counting the resource settings in the virtual server instance and comparing that against the RASDs actually found. Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com> --- suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py b/suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py index d582ffb..5517a72 100644 --- a/suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py +++ b/suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py @@ -71,10 +71,6 @@ def init_rasd_list(virt, ip, guest_name): if guest == guest_name: rasd_insts[rasd.Classname] = rasd - if len(rasds) != len(rasd_insts): - logger.error("Expected %d RASDs, got %d", len(rasds), len(rasd_insts)) - return rasd_insts, FAIL - return rasd_insts, PASS @do_main(sup_types) @@ -106,6 +102,11 @@ def main(): logger.error("Unable to build rasd instance list") return status + if len(vsxml.res_settings) != len(rasds): + logger.error("Expected %d RASDs, got %d", len(vsxml.res_settings), + len(rasds)) + return FAIL + expr_values = { 'rc' : CIM_ERR_NOT_FOUND, 'desc' : 'No such instance' -- 1.7.9.5