[PATCH] Fix logic that determines memory only or memory terminal snapshot
by Jim Fehlig
# HG changeset patch
# User Jim Fehlig <jfehlig(a)novell.com>
# Date 1218080112 21600
# Node ID 394f63c771edba0828e4aa0b48f7e9e2689b14c7
# Parent 9f2f9b117797907bfa2b89a499b4eb5bb62cd458
Fix logic that determines memory only or memory terminal snapshot
According to comments in Virt_VirtualSystemSnapshotService.h and
VirtualSystemSnapshotService.mof, it seems logic that determines
whether to do a restore uses wrong definition.
Signed-off-by: Jim Fehlig <jfehlig(a)novell.com>
diff -r 9f2f9b117797 -r 394f63c771ed src/Virt_VirtualSystemSnapshotService.c
--- a/src/Virt_VirtualSystemSnapshotService.c Mon Aug 04 11:57:27 2008 -0700
+++ b/src/Virt_VirtualSystemSnapshotService.c Wed Aug 06 21:35:12 2008 -0600
@@ -397,7 +397,7 @@ static CMPIStatus start_snapshot_job(con
}
ctx->save = (type != 0);
- ctx->restore = (type != VIR_VSSS_SNAPSHOT_MEM);
+ ctx->restore = (type != VIR_VSSS_SNAPSHOT_MEMT);
s = create_job(context, ref, ctx, &job);
16 years, 4 months
[PATCH] [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one
by yunguol@cn.ibm.com
# HG changeset patch
# User root(a)elm3b197.beaverton.ibm.com
# Date 1217987020 25200
# Node ID f50bfc180219f6cca02e73b55ec4472b07bc64ac
# Parent 3add446da91108d419ce8adae434ebc78039fa34
[TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3add446da911 -r f50bfc180219 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Aug 05 08:59:29 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Aug 05 18:43:40 2008 -0700
@@ -171,7 +171,7 @@ def main():
if status != PASS:
return status
- status, test_network = create_netpool_conf(server, virt)
+ status, test_network = create_netpool_conf(server, virt, use_existing=True)
if status != PASS:
return status
@@ -184,7 +184,6 @@ def main():
return status
cleanup_restore(server, virt)
- destroy_netpool(server, virt, test_network)
vsxml.undefine(server)
return status
16 years, 4 months
[PATCH] Fix name of Snaphot parameter to ApplySnapshot
by Jim Fehlig
# HG changeset patch
# User Jim Fehlig <jfehlig(a)novell.com>
# Date 1218080667 21600
# Node ID 245baf0acbcbe3f2f0f425bf0d803110fa8c9eaa
# Parent 394f63c771edba0828e4aa0b48f7e9e2689b14c7
Fix name of Snaphot parameter to ApplySnapshot
The ApplySnapshot extrinsic takes 1 input parameter named Snapshot.
Change parameter name from AffectedSnapshot to Snapshot.
Signed-off-by: Jim Fehlig <jfehlig(a)novell.com>
diff -r 394f63c771ed -r 245baf0acbcb src/Virt_VirtualSystemSnapshotService.c
--- a/src/Virt_VirtualSystemSnapshotService.c Wed Aug 06 21:35:12 2008 -0600
+++ b/src/Virt_VirtualSystemSnapshotService.c Wed Aug 06 21:44:27 2008 -0600
@@ -542,7 +542,7 @@ static CMPIStatus apply_snapshot(CMPIMet
char *name = NULL;
uint32_t retcode = CIM_RETURN_FAILED;
- if (cu_get_ref_arg(argsin, "AffectedSnapshot", &snap) != CMPI_RC_OK) {
+ if (cu_get_ref_arg(argsin, "Snapshot", &snap) != CMPI_RC_OK) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_INVALID_PARAMETER,
"Missing Snapshot");
@@ -587,7 +587,7 @@ static struct method_handler ApplySnapsh
static struct method_handler ApplySnapshot = {
.name = "ApplySnapshot",
.handler = apply_snapshot,
- .args = {{"AffectedSnapshot", CMPI_ref, false},
+ .args = {{"Snapshot", CMPI_ref, false},
ARG_END}
};
16 years, 4 months
[PATCH] (#2) When saving out the infostore, clear any previous data
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1217613773 25200
# Node ID ca56c48f31038a8dc718e09ef8bf68a8917408fa
# Parent 9f2f9b117797907bfa2b89a499b4eb5bb62cd458
(#2) When saving out the infostore, clear any previous data.
Updates:
-Replace additional open call with ftruncate()
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 9f2f9b117797 -r ca56c48f3103 libxkutil/infostore.c
--- a/libxkutil/infostore.c Mon Aug 04 11:57:27 2008 -0700
+++ b/libxkutil/infostore.c Fri Aug 01 11:02:53 2008 -0700
@@ -150,6 +150,9 @@
long size = 0;
lseek(ctx->fd, 0, SEEK_SET);
+
+ if (ftruncate(ctx->fd, 0) != 0)
+ CU_DEBUG("Unable to truncate infostore");
save = xmlSaveToFd(ctx->fd, NULL, 0);
if (save == NULL) {
16 years, 4 months
[PATCH] When saving out the infostore, clear any previous data
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1217613773 25200
# Node ID a9e3b40692cef1635f1c377f896fc2d5be0b3c16
# Parent d7406e2f4670208cfe61ef9c0065164292ab3942
When saving out the infostore, clear any previous data.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r d7406e2f4670 -r a9e3b40692ce libxkutil/infostore.c
--- a/libxkutil/infostore.c Tue Jul 29 12:34:38 2008 -0700
+++ b/libxkutil/infostore.c Fri Aug 01 11:02:53 2008 -0700
@@ -24,6 +24,7 @@
#include <unistd.h>
#include <inttypes.h>
#include <sys/file.h>
+#include <string.h>
#include <libvirt/libvirt.h>
#include <libxml/parser.h>
@@ -42,6 +43,7 @@
xmlNodePtr root;
xmlXPathContextPtr xpathctx;
int fd;
+ char *filename;
};
static void infostore_cleanup_ctx(struct infostore_ctx *ctx)
@@ -49,6 +51,7 @@
xmlXPathFreeContext(ctx->xpathctx);
xmlFreeDoc(ctx->doc);
close(ctx->fd);
+ free(ctx->filename);
free(ctx);
}
@@ -148,7 +151,12 @@
xmlSaveCtxtPtr save = NULL;
long size = 0;
- lseek(ctx->fd, 0, SEEK_SET);
+ close(ctx->fd);
+ ctx->fd = open(ctx->filename, O_RDWR|O_TRUNC, 0600);
+ if (ctx->fd < 0) {
+ CU_DEBUG("Unable to open `%s': %m", ctx->filename);
+ goto out;
+ }
save = xmlSaveToFd(ctx->fd, NULL, 0);
if (save == NULL) {
@@ -179,6 +187,8 @@
filename = make_filename(dom);
if (filename == NULL)
goto err;
+
+ isc->filename = strdup(filename);
isc->fd = open(filename, O_RDWR|O_CREAT, 0600);
if (isc->fd < 0) {
@@ -310,6 +320,7 @@
}
xmlNodeSetContent(node, BAD_CAST val);
+
out:
xmlXPathFreeObject(result);
16 years, 4 months
Cimtest Report for KVM on F9 with current sources (2008/08/06)
by Guo Lian Yun
Kernel : kernel-2.6.25-0.121.rc5.git4.fc9.x86_64
Libvirt : libvirt-0.4.4
CIMOM : sblim-sfcb-1.3.0
PyWBEM : pywbem-0.6
CIM Schema : cimv216Experimental
LibCMPIutil : 83
LibVirtCIM : 660
CIMTEST : 283
=========================================================
PASS : 110
FAILED : 6
XFAIL : 3
SKIP : 14
Total : 133
=======================FAILED==============================
ResourceAllocationFromPool - 01_forward.py: FAIL
ERROR - Return NULL, expect at least one instance
This fails because of NetworkPool, a patch on the way.
ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL
ERROR - Unexpected rc code 7 and description The requested operation is
not supported
InvokeMethod(CreateResourcePool): The requested operation is not supported
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL
ERROR - Unexpected rc code 7 and description The requested operation is
not supported
InvokeMethod(CreateChildResourcePool): The requested operation is not
supported
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py:
FAIL
ERROR - Unexpected rc code 7 and description The requested operation is
not supported
InvokeMethod(RemoveResourcesFromResourcePool): The requested operation is
not supported
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL
ERROR - Unexpected rc code 7 and description The requested operation is
not supported
InvokeMethod(DeleteResourcePool): The requested operation is not supported
VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL
ERROR - destroy_fail>> noname: Error executing DestroySystem
ERROR - (1, u'Unable to retrieve domain name.')
ERROR - destroy_fail>> nonexistent: Error executing DestroySystem
ERROR - (1, u'Failed to find domain')
InvokeMethod(DestroySystem): Unable to retrieve domain name.
InvokeMethod(DestroySystem): Failed to find domain
=======================CIMTEST REPORT=======================
Cleaned log files.
Testing KVM hypervisor
AllocationCapabilities - 01_enum.py: PASS
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
ComputerSystem - 01_enum.py: PASS
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
ComputerSystem - 03_defineVS.py: PASS
ComputerSystem - 04_defineStartVS.py: PASS
ComputerSystem - 05_activate_defined_start.py: PASS
ComputerSystem - 06_paused_active_suspend.py: PASS
ComputerSystem - 22_define_suspend.py: SKIP
ERROR - Need to give different bridge name since it already exists
ComputerSystem - 23_suspend_suspend.py: PASS
ComputerSystem - 27_define_suspend_errs.py: SKIP
ComputerSystem - 32_start_reboot.py: XFAIL Bug: 00002
ERROR - Exception: (1, u'Domain Operation Failed')
ERROR - Unable to 'Reboot' dom 'cs_test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): Domain Operation Failed
Bug:<00002>
ComputerSystem - 33_suspend_reboot.py: XFAIL Bug: 00002
ERROR - Exception: (1, u'Domain not running')
ERROR - Unable to 'Reboot' dom 'test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): Domain not running
Bug:<00002>
ComputerSystem - 35_start_reset.py: PASS
ComputerSystem - 40_RSC_start.py: PASS
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
ComputerSystem - 42_cs_gi_errs.py: PASS
ComputerSystemIndication - 01_created_indication.py: PASS
ElementAllocatedFromPool - 01_forward.py: PASS
ElementAllocatedFromPool - 02_reverse.py: PASS
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
ElementAllocatedFromPool - 04_forward_errs.py: PASS
ElementCapabilities - 01_forward.py: PASS
ElementCapabilities - 02_reverse.py: PASS
ElementCapabilities - 03_forward_errs.py: PASS
ElementCapabilities - 04_reverse_errs.py: PASS
ElementCapabilities - 05_hostsystem_cap.py: PASS
ElementConforms - 01_forward.py: PASS
ElementConforms - 02_reverse.py: PASS
ElementConforms - 03_ectp_fwd_errs.py: PASS
ElementConforms - 04_ectp_rev_errs.py: PASS
ElementSettingData - 01_forward.py: PASS
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
EnabledLogicalElementCapabilities - 01_enum.py: PASS
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
HostSystem - 01_enum.py: PASS
HostSystem - 02_hostsystem_to_rasd.py: PASS
HostSystem - 03_hs_to_settdefcap.py: PASS
HostSystem - 04_hs_to_EAPF.py: PASS
HostSystem - 05_hs_gi_errs.py: PASS
HostSystem - 06_hs_to_vsms.py: PASS
HostedDependency - 01_forward.py: PASS
HostedDependency - 02_reverse.py: PASS
HostedDependency - 03_enabledstate.py: PASS
HostedDependency - 04_reverse_errs.py: PASS
HostedResourcePool - 01_forward.py: PASS
HostedResourcePool - 02_reverse.py: PASS
HostedResourcePool - 03_forward_errs.py: PASS
HostedResourcePool - 04_reverse_errs.py: PASS
HostedService - 01_forward.py: PASS
HostedService - 02_reverse.py: PASS
HostedService - 03_forward_errs.py: PASS
HostedService - 04_reverse_errs.py: PASS
LogicalDisk - 01_disk.py: PASS
LogicalDisk - 02_nodevs.py: SKIP
ERROR - System has defined domains; unable to run
LogicalDisk - 03_ld_gi_errs.py: PASS
Memory - 01_memory.py: PASS
Memory - 02_defgetmem.py: PASS
Memory - 03_mem_gi_errs.py: PASS
NetworkPort - 01_netport.py: PASS
NetworkPort - 02_np_gi_errors.py: PASS
NetworkPort - 03_user_netport.py: PASS
Processor - 01_processor.py: PASS
Processor - 02_definesys_get_procs.py: PASS
Processor - 03_proc_gi_errs.py: PASS
Profile - 01_enum.py: PASS
Profile - 02_profile_to_elec.py: SKIP
Profile - 03_rprofile_gi_errs.py: PASS
RASD - 01_verify_rasd_fields.py: PASS
RASD - 02_enum.py: PASS
RASD - 03_rasd_errs.py: PASS
RASD - 04_disk_rasd_size.py: PASS
ReferencedProfile - 01_verify_refprof.py: PASS
ReferencedProfile - 02_refprofile_errs.py: PASS
ResourceAllocationFromPool - 01_forward.py: FAIL
ERROR - Return NULL, expect at least one instance
ResourceAllocationFromPool - 02_reverse.py: SKIP
ERROR - Need to give different bridge name since it already exists
ResourceAllocationFromPool - 03_forward_errs.py: PASS
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
ResourcePool - 01_enum.py: PASS
ResourcePool - 02_rp_gi_errors.py: PASS
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
ResourcePoolConfigurationService - 01_enum.py: PASS
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL
ERROR - Unexpected rc code 7 and description The requested operation is
not supported
InvokeMethod(CreateResourcePool): The requested operation is not supported
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL
ERROR - Unexpected rc code 7 and description The requested operation is
not supported
InvokeMethod(CreateChildResourcePool): The requested operation is not
supported
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py:
FAIL
ERROR - Unexpected rc code 7 and description The requested operation is
not supported
InvokeMethod(RemoveResourcesFromResourcePool): The requested operation is
not supported
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL
ERROR - Unexpected rc code 7 and description The requested operation is
not supported
InvokeMethod(DeleteResourcePool): The requested operation is not supported
SettingsDefine - 01_forward.py: PASS
SettingsDefine - 02_reverse.py: PASS
SettingsDefine - 03_sds_fwd_errs.py: PASS
SettingsDefine - 04_sds_rev_errs.py: PASS
SettingsDefineCapabilities - 01_forward.py: SKIP
ERROR - Need to give different bridge name since it already exists
SettingsDefineCapabilities - 03_forward_errs.py: XFAIL Bug: Test error:
returned XFAIL without a valid bug string.
ERROR - 'KVM_SettingsDefineCapabilities' association failed to generate
an exception and 'WrongClassName' passed.
ERROR - ------ FAILED: Invalid CCName Key Name.------
Bug:<>
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
SystemDevice - 01_forward.py: PASS
SystemDevice - 02_reverse.py: PASS
SystemDevice - 03_fwderrs.py: PASS
VSSD - 01_enum.py: PASS
VSSD - 02_bootldr.py: SKIP
VSSD - 03_vssd_gi_errs.py: PASS
SD - 04_vssd_to_rasd.py: PASS
VirtualSystemManagementCapabilities - 01_enum.py: PASS
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
VirtualSystemManagementService - 01_definesystem_name.py: PASS
VirtualSystemManagementService - 02_destroysystem.py: PASS
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL
InvokeMethod(DestroySystem): Unable to retrieve domain name.
InvokeMethod(DestroySystem): Failed to find domain
VirtualSystemManagementService - 06_addresource.py: SKIP
VirtualSystemManagementService - 07_addresource_neg.py: PASS
VirtualSystemManagementService - 08_modifyresource.py: PASS
VirtualSystemManagementService - 09_procrasd_persist.py: SKIP
VirtualSystemManagementService - 10_hv_version.py: PASS
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationSettingData - 01_enum.py: PASS
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
VirtualSystemSettingDataComponent - 01_forward.py: PASS
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
VirtualSystemSnapshotService - 01_enum.py: PASS
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py:
PASS
Best,
Regards
Daisy (运国莲)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol(a)cn.ibm.com
TEL: (86)-21-60922403
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203
16 years, 4 months
[PATCH] [TEST] Adding KVM support to 27_define_suspend_errs.py tc of CS provider
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1218028082 25200
# Node ID 61d83397310fc918956d079a7500d83c67637718
# Parent 3add446da91108d419ce8adae434ebc78039fa34
[TEST] Adding KVM support to 27_define_suspend_errs.py tc of CS provider.
Changes:
--------
1) Added KVM support.
2) Using the library function try_request_state_change() to verify the exception.
3) Added create_netpool_conf(), destroy_netpool() functions since VSMS requires networkpool.
4) Using destroy_and_undefine_domain() to destroy and undefine the domain.
Tested with KVM, XenFV, Xen on current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 3add446da911 -r 61d83397310f suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Tue Aug 05 08:59:29 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Wed Aug 06 06:08:02 2008 -0700
@@ -41,11 +41,12 @@ from VirtLib import utils
from VirtLib import utils
from CimTest.Globals import do_main, logger
from CimTest.ReturnCodes import PASS, FAIL
-from XenKvmLib.test_doms import undefine_test_domain
-from XenKvmLib.common_util import get_cs_instance
+from XenKvmLib.test_doms import destroy_and_undefine_domain
+from XenKvmLib.common_util import try_request_state_change
from XenKvmLib.common_util import create_using_definesystem
+from XenKvmLib.common_util import create_netpool_conf, destroy_netpool
-sup_types = ['Xen', 'XenFV', 'LXC']
+sup_types = ['Xen', 'XenFV', 'LXC', 'KVM']
SUSPEND_STATE = 9
default_dom = 'test_domain'
@@ -53,44 +54,42 @@ exp_rc = pywbem.CIM_ERR_FAILED
exp_rc = pywbem.CIM_ERR_FAILED
exp_desc = 'Domain not running'
+
@do_main(sup_types)
def main():
options = main.options
+ server = options.ip
+ virt = options.virt
+ status = FAIL
+
+ status, test_network = create_netpool_conf(server, virt, False)
+ if status != PASS:
+ return FAIL
try:
# define the vs
- status = create_using_definesystem(default_dom, options.ip,
- virt=options.virt)
+ status = create_using_definesystem(default_dom, server, virt=virt)
if status != PASS:
- logger.error("Unable to define domain %s using DefineSystem()", \
- default_dom)
- return FAIL
+ logger.error("Unable to define domain '%s' using DefineSystem()",
+ default_dom)
+ return status
- rc, cs = get_cs_instance(default_dom, options.ip, options.virt)
- if rc != 0:
- logger.error("GetInstance failed")
- undefine_test_domain(default_dom, options.ip)
- return FAIL
-
- # try to suspend
- cs.RequestStateChange( \
- RequestedState=pywbem.cim_types.Uint16(SUSPEND_STATE), \
- TimeoutPeriod=pywbem.cim_types.CIMDateTime(TIME))
-
- except pywbem.CIMError, (err_no, desc):
- if err_no == exp_rc and desc.find(exp_desc) >= 0:
- logger.info("Got expected exception where ")
- logger.info("Errno is '%s' ", exp_rc)
- logger.info("Error string is '%s'", exp_desc)
- undefine_test_domain(default_dom, options.ip, options.virt)
- return PASS
- logger.error("Unexpected RC: %s & Desc. %s", err_no, desc)
- undefine_test_domain(default_dom, options.ip, options.virt)
+ except Exception, details:
+ logger.error("Exception: %s", details)
+ destroy_netpool(server, virt, test_network)
+ destroy_and_undefine_domain(default_dom, server, virt)
return FAIL
- logger.error("Expected Defined -> Suspended state transition to fail")
- undefine_test_domain(default_dom, options.ip, options.virt)
- return FAIL
+ status = try_request_state_change(default_dom, server,
+ SUSPEND_STATE, TIME, exp_rc,
+ exp_desc, virt)
+
+ if status != PASS:
+ logger.error("Expected Defined -> Suspended state transition to fail")
+
+ destroy_netpool(server, virt, test_network)
+ destroy_and_undefine_domain(default_dom, server, virt)
+ return status
if __name__ == "__main__":
sys.exit(main())
16 years, 4 months
[PATCH] [TEST] Fix ResourceAllocationFromPool.01, use existing Networkpool instead of creating a new one
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1217990822 25200
# Node ID 50d6db48dd8f95bf84644dbb2f120a89241151c7
# Parent 3add446da91108d419ce8adae434ebc78039fa34
[TEST] Fix ResourceAllocationFromPool.01, use existing Networkpool instead of creating a new one
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3add446da911 -r 50d6db48dd8f suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Tue Aug 05 08:59:29 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Tue Aug 05 19:47:02 2008 -0700
@@ -121,7 +121,8 @@ def main():
vsxml.undefine(options.ip)
return status
- status, test_network = create_netpool_conf(options.ip, options.virt)
+ status, test_network = create_netpool_conf(options.ip, options.virt,
+ use_existing=True)
if status != PASS:
cleanup_restore(options.ip, options.virt)
vsxml.undefine(options.ip)
@@ -152,7 +153,6 @@ def main():
break
cleanup_restore(options.ip, options.virt)
- destroy_netpool(options.ip, options.virt, test_network)
vsxml.undefine(options.ip)
return status
16 years, 4 months
[PATCH 0 of 7] Changes to common_util.py library and test cases affected changes.
by Deepti B. Kalakeri
1) Fixed get_cs_instance() debug statement.
2) Moved the common code which tried to match the error to a new fn verify_err_desc().
3) Added try_request_state_change() to verify the error conditions of RequestStateChange().
4) Changed the poll_for_state_change() function to return cs instance along with the status.
5) Added KVM support to 23_suspend_suspend.py, 32_start_reboot.py, 33_suspend_reboot.py, 35_start_reset.py.
6) Fixing 06_paused_active_suspend.py tc.
7) Updated 09_procrasd_persist.py to accomdate the poll_for_state_change() changes.
8) Updated 01_migratable_host.py and 02_host_migrate_type.py to accomdate the poll_for_state_change() changes.
For the tc to work on KVM, this patchset is dependent on the vsms library related changes submit as part of
"Adding AllocationUnits field to MemRASD and updating the call to MemRASD in the libraries where it is accessed." patch.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
16 years, 4 months