# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1217830581 25200
# Node ID a5b12e49cfe1db373f34bd35cf20060ca74f83a7
# Parent 4ed904b18000ef148cb82e6b28729460970cca24
[TEST] Updating the test cases which are affected by poll_for_state_change() library
function changes.
1) Updated 09_procrasd_persist.py to accomdate the poll_for_state_change() changes.
Also, modified to include the create_netpool_conf(), destroy_netpool() functions.
2) Updated 01_migratable_host.py and 02_host_migrate_type.py to accomdate the
poll_for_state_change() changes.
The changes are verified with KVM, Xen, XenFV with current sources.
01_migratable_host.py and 02_host_migrate_type.py are skipped for KVM and should be
supported to work on KVM.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 4ed904b18000 -r a5b12e49cfe1
suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Sun
Aug 03 23:11:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Sun
Aug 03 23:16:21 2008 -0700
@@ -30,6 +30,7 @@
from CimTest.Globals import do_main
from CimTest.ReturnCodes import FAIL, PASS
from XenKvmLib.test_doms import destroy_and_undefine_domain
+from XenKvmLib.common_util import create_netpool_conf, destroy_netpool
sup_types = ['Xen', 'XenFV', 'KVM']
default_dom = 'rstest_domain'
@@ -94,6 +95,11 @@
def main():
options = main.options
+ status, test_network = create_netpool_conf(options.ip, options.virt, False)
+ if status != PASS:
+ return FAIL
+
+
status, vssd, rasd = setup_rasd_mof(options.ip, options.virt)
if status != PASS:
return status
@@ -111,8 +117,8 @@
raise Exception("Unable to start %s using RequestedStateChange()"
%
default_dom)
- status = poll_for_state_change(options.ip, options.virt, default_dom,
- REQUESTED_STATE)
+ status, dom_cs = poll_for_state_change(options.ip, options.virt, default_dom,
+ REQUESTED_STATE)
if status != PASS:
raise Exception("%s didn't change state as expected" %
default_dom)
@@ -128,6 +134,7 @@
logger.error(details)
status = FAIL
+ destroy_netpool(options.ip, options.virt, test_network)
destroy_and_undefine_domain(default_dom, options.ip, options.virt)
return status
diff -r 4ed904b18000 -r a5b12e49cfe1
suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Sun
Aug 03 23:11:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Sun
Aug 03 23:16:21 2008 -0700
@@ -49,8 +49,8 @@
logger.error("Error create domain %s" % guest_name)
return FAIL
- status = poll_for_state_change(ip, virt, guest_name,
- REQUESTED_STATE)
+ status, dom_cs = poll_for_state_change(ip, virt, guest_name,
+ REQUESTED_STATE)
if status != PASS:
raise Exception("%s didn't change state as expected" % guest_name)
return FAIL
diff -r 4ed904b18000 -r a5b12e49cfe1
suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Sun
Aug 03 23:11:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Sun
Aug 03 23:16:21 2008 -0700
@@ -99,8 +99,8 @@
cxml = virt_xml(guest_name)
cxml.start(ip)
- status = poll_for_state_change(ip, virt, guest_name,
- REQUESTED_STATE)
+ status, dom_cs = poll_for_state_change(ip, virt, guest_name,
+ REQUESTED_STATE)
if status != PASS:
raise Exception("%s didn't change state as expected" %
guest_name)
return FAIL, None