debuggers.hg

view tools/xm-test/tests/save/01_save_basic_pos.py @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
1 #!/usr/bin/python
3 # Copyright (C) International Business Machines Corp., 2005
4 # Author: Dan Smith <danms@us.ibm.com>
6 import time
8 from XmTestLib import *
10 if ENABLE_HVM_SUPPORT:
11 SKIP("Save currently not supported for HVM domains")
13 domain = XmTestDomain()
15 try:
16 console = domain.start()
17 except DomainError, e:
18 if verbose:
19 print "Failed to create test domain because:"
20 print e.extra
21 FAIL(str(e))
23 domain.closeConsole()
25 # Save it out
26 try:
27 s, o = traceCommand("xm save %s /tmp/test.state" % domain.getName(),
28 timeout=30)
29 except TimeoutError, e:
30 FAIL(str(e))
32 if s != 0:
33 FAIL("save command exited %i != 0" % s)
35 # Make sure it's gone
36 if isDomainRunning(domain.getName()):
37 FAIL("Domain still running after save!")