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.4 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 | if ENABLE_HVM_SUPPORT: |
---|
9 | SKIP("Mem-set not supported for HVM domains") |
---|
10 | |
---|
11 | domain = XmTestDomain() |
---|
12 | |
---|
13 | try: |
---|
14 | console = domain.start() |
---|
15 | except DomainError, e: |
---|
16 | if verbose: |
---|
17 | print "Failed to start domain: " |
---|
18 | print e.extra |
---|
19 | FAIL(str(e)) |
---|
20 | |
---|
21 | try: |
---|
22 | # Make sure it's alive before we proceed |
---|
23 | console.runCmd("ls") |
---|
24 | except ConsoleError, e: |
---|
25 | FAIL(str(e)) |
---|
26 | |
---|
27 | status, output = traceCommand("xm mem-set %s %i" % |
---|
28 | (domain.getName(), 15)) |
---|
29 | |
---|
30 | if status != 0: |
---|
31 | FAIL("xm mem-set %s %i returned invalid %i != 0" % |
---|
32 | (domain.getName(), domain.minSafeMem(), status)) |
---|
33 | |
---|
34 | console.setLimit(65536) |
---|
35 | |
---|
36 | try: |
---|
37 | # See if this hits the byte limit |
---|
38 | console.runCmd("ls") |
---|
39 | except ConsoleError, e: |
---|
40 | if e.reason == RUNAWAY: |
---|
41 | # Need to stop the domain before we restart the console daemon |
---|
42 | domain.destroy() |
---|
43 | if isConsoleDead(): |
---|
44 | print "*** Attempting restart of xenconsoled" |
---|
45 | s, o = traceCommand("killall xenconsoled") |
---|
46 | s, o = traceCommand("xenconsoled") |
---|
47 | if s != 0: |
---|
48 | print "*** Starting xenconsoled failed: %i" % s |
---|
49 | FAIL("Bug #380: I crashed the console system") |
---|
50 | else: |
---|
51 | FAIL("Bug #145: Ballooning DomU too low caused run-away") |
---|
52 | else: |
---|
53 | FAIL(str(e)) |
---|
54 | |
---|
55 | domain.destroy() |
---|
Note: See
TracBrowser
for help on using the repository browser.