Last change
on this file since 34 was
34,
checked in by hartmans, 18 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: Dan Smith <danms@us.ibm.com> |
---|
5 | |
---|
6 | from XmTestLib import * |
---|
7 | |
---|
8 | import re |
---|
9 | |
---|
10 | # |
---|
11 | # Check to see if the output resembles the |
---|
12 | # "No such process error" |
---|
13 | # |
---|
14 | def check_for_NSP_error(output): |
---|
15 | if re.search("XendError.*No such process", output): |
---|
16 | return "Bugzilla bug #234" |
---|
17 | else: |
---|
18 | return None |
---|
19 | |
---|
20 | def check_for_DUP_error(output): |
---|
21 | if re.search("Error.*already exists\!", output): |
---|
22 | return "Xend reported duplicate domain (stale state?)" |
---|
23 | else: |
---|
24 | return None |
---|
25 | |
---|
26 | i = 0 |
---|
27 | |
---|
28 | for i in range(0,50): |
---|
29 | domain = XmTestDomain("testdomain") |
---|
30 | try: |
---|
31 | domain.start(noConsole=True) |
---|
32 | except DomainError,e: |
---|
33 | print "Failed: " + e.extra |
---|
34 | NSPerror = check_for_NSP_error(e.extra) |
---|
35 | DUPerror = check_for_DUP_error(e.extra) |
---|
36 | if NSPerror: |
---|
37 | FAIL(NSPerror) |
---|
38 | elif DUPerror: |
---|
39 | FAIL(DUPerror) |
---|
40 | else: |
---|
41 | FAIL("xm create returned invalid status: %i" % e.errorcode) |
---|
42 | domain.destroy() |
---|
43 | |
---|
Note: See
TracBrowser
for help on using the repository browser.