Last change
on this file since 34 was
34,
checked in by hartmans, 17 years ago
|
Add xen and xen-common
|
-
Property svn:mime-type set to
text/script
|
File size:
1.0 KB
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
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. |
---|
8 | |
---|
9 | import time |
---|
10 | |
---|
11 | from XmTestLib import * |
---|
12 | |
---|
13 | if ENABLE_HVM_SUPPORT: |
---|
14 | SKIP("Save currently not supported for HVM domains") |
---|
15 | |
---|
16 | domain = XmTestDomain() |
---|
17 | |
---|
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)) |
---|
25 | |
---|
26 | domain.closeConsole() |
---|
27 | |
---|
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) |
---|
Note: See
TracBrowser
for help on using the repository browser.