ia64/xen-unstable

view tools/xm-test/tests/save/03_save_bogusfile_neg.py @ 19615:13a4f4e6d0a3

x86 hvm: Correctly emulate task switches into vm86 mode.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue May 19 02:12:04 2009 +0100 (2009-05-19)
parents bef7f5fcf207
children
line source
1 #!/usr/bin/python
3 # Copyright (C) International Business Machines Corp., 2005
4 # Author: Li Ge <lge@us.ibm.com>
5 # Test Description:
6 # Negative Test:
7 # Create a new domain. Save this domain to bogus file reference. Verify fail.
9 import time
11 from XmTestLib import *
13 if ENABLE_HVM_SUPPORT:
14 SKIP("Save currently not supported for HVM domains")
16 domain = XmTestDomain()
18 try:
19 console = domain.start()
20 except DomainError, e:
21 if verbose:
22 print "Failed to create test domain because:"
23 print e.extra
24 FAIL(str(e))
26 domain.closeConsole()
28 # Save it out
29 status, output = traceCommand("xm save %s /NOWHERE/test.state" % domain.getName())
30 eyecatcher1 = "Traceback"
31 eyecatcher2 = "Error:"
32 where1 = output.find(eyecatcher1)
33 where2 = output.find(eyecatcher2)
34 if status == 0:
35 FAIL("xm save returned bad status, expected non 0, status is: %i" % status)
36 elif where1 == 0:
37 FAIL("xm save returned a stack dump, expected nice error message")
38 elif where2 == -1:
39 FAIL("xm save returned bad output, expected Error:, output is: %s" % output)