aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test/tests
diff options
context:
space:
mode:
authorKeir Fraser <keir@xensource.com>2007-10-25 09:22:28 +0100
committerKeir Fraser <keir@xensource.com>2007-10-25 09:22:28 +0100
commit61d0b64c6c2ca2eda3867c2ea32d406418e67dba (patch)
tree63f7c021ecf485dd583d605ebe06e7c872fdf51e /tools/xm-test/tests
parent78c593d291e12ed70b75aa32b306a2e266cda2fe (diff)
downloadxen-61d0b64c6c2ca2eda3867c2ea32d406418e67dba.tar.gz
xen-61d0b64c6c2ca2eda3867c2ea32d406418e67dba.tar.bz2
xen-61d0b64c6c2ca2eda3867c2ea32d406418e67dba.zip
xm-test: various fixes
- recently I added an other_config field to the VTPM record which now needs to be accounted for otherwise the test determines a bad key - the dry-run command was throwing a different type of exception (ACMError) than what was caught (XSMError) - the tests based on the raw Xen-API need to build the PV_args parameters from the old 'root' and 'extra' parameters. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Diffstat (limited to 'tools/xm-test/tests')
-rw-r--r--tools/xm-test/tests/security-acm/08_security-acm_xapi.py5
-rw-r--r--tools/xm-test/tests/vtpm/09_vtpm-xapi.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/xm-test/tests/security-acm/08_security-acm_xapi.py b/tools/xm-test/tests/security-acm/08_security-acm_xapi.py
index 44e2fce008..469bf35a91 100644
--- a/tools/xm-test/tests/security-acm/08_security-acm_xapi.py
+++ b/tools/xm-test/tests/security-acm/08_security-acm_xapi.py
@@ -19,6 +19,9 @@ vm_label_green = xsconstants.ACM_POLICY_ID + ":xm-test:green"
vdi_label_red = xsconstants.ACM_POLICY_ID + ":xm-test:red"
vdi_label_green = xsconstants.ACM_POLICY_ID + ":xm-test:green"
+vm_label_unlabeled = xsconstants.ACM_POLICY_ID + ":xm-test:" + \
+ acmpolicy.ACM_LABEL_UNLABELED
+
vdi_file = "/dev/ram0"
vdi_path = "phy:" + vdi_file
@@ -105,7 +108,7 @@ if int(res) != 0:
FAIL("Should be able to unlabel the domain while it's halted.")
res = session.xenapi.VM.get_security_label(vm_uuid)
-if res != "":
+if res != vm_label_unlabeled:
FAIL("Unexpected VM security label after removal: %s" % res)
res = session.xenapi.VM.set_security_label(vm_uuid, vm_label_red, res)
diff --git a/tools/xm-test/tests/vtpm/09_vtpm-xapi.py b/tools/xm-test/tests/vtpm/09_vtpm-xapi.py
index 5c8fb11880..a1aa8b3c70 100644
--- a/tools/xm-test/tests/vtpm/09_vtpm-xapi.py
+++ b/tools/xm-test/tests/vtpm/09_vtpm-xapi.py
@@ -17,7 +17,7 @@ from vtpm_utils import *
import commands
import os
-VTPM_RECORD_KEYS = [ 'backend', 'VM', 'uuid' ]
+VTPM_RECORD_KEYS = [ 'backend', 'VM', 'uuid', 'other_config' ]
try:
# XmTestAPIDomain tries to establish a connection to XenD