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: Li Ge <lge@us.ibm.com> |
---|
5 | |
---|
6 | #Negative Test: attempt removal of non-attached device from live domain |
---|
7 | |
---|
8 | from XmTestLib import * |
---|
9 | |
---|
10 | if ENABLE_HVM_SUPPORT: |
---|
11 | SKIP("Block-detach not supported for HVM domains") |
---|
12 | |
---|
13 | domain = XmTestDomain() |
---|
14 | |
---|
15 | try: |
---|
16 | domain.start(noConsole=True) |
---|
17 | except DomainError, e: |
---|
18 | if verbose: |
---|
19 | print e.extra |
---|
20 | FAIL("Unable to create domain") |
---|
21 | |
---|
22 | status, output = traceCommand("xm block-detach %s xvda1" % domain.getId()) |
---|
23 | |
---|
24 | eyecatcher1 = "Error:" |
---|
25 | eyecatcher2 = "Traceback" |
---|
26 | where1 = output.find(eyecatcher1) |
---|
27 | where2 = output.find(eyecatcher2) |
---|
28 | if status == 0: |
---|
29 | FAIL("xm block-detach returned bad status, expected non 0, status is: %i" % status) |
---|
30 | elif where2 == 0: |
---|
31 | FAIL("xm block-detach returned a stack dump, expected nice error message") |
---|
32 | elif where1 < 0: |
---|
33 | FAIL("xm block-detach returned bad output, expected Error:, output is: %s" % output) |
---|
Note: See
TracBrowser
for help on using the repository browser.