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.1 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 | # Positive Test: create domain with block attached at build time, verify list |
---|
7 | |
---|
8 | |
---|
9 | from XmTestLib import * |
---|
10 | |
---|
11 | if ENABLE_HVM_SUPPORT: |
---|
12 | SKIP("Block-list not supported for HVM domains") |
---|
13 | |
---|
14 | config = {"disk":"phy:/dev/ram0,xvda1,w"} |
---|
15 | domain = XmTestDomain(extraConfig=config) |
---|
16 | |
---|
17 | try: |
---|
18 | console = domain.start() |
---|
19 | except DomainError, e: |
---|
20 | if verbose: |
---|
21 | print e.extra |
---|
22 | FAIL("Unable to create domain") |
---|
23 | |
---|
24 | status, output = traceCommand("xm block-list %s" % domain.getId()) |
---|
25 | eyecatcher = "51713" |
---|
26 | where = output.find(eyecatcher) |
---|
27 | if status != 0: |
---|
28 | FAIL("xm block-list returned bad status, expected 0, status is %i" % status) |
---|
29 | elif where < 0: |
---|
30 | FAIL("Fail to list block device") |
---|
31 | |
---|
32 | #Verify the block device on DomainU |
---|
33 | try: |
---|
34 | run = console.runCmd("cat /proc/partitions | grep xvda1") |
---|
35 | except ConsoleError, e: |
---|
36 | saveLog(console.getHistory()) |
---|
37 | FAIL(str(e)) |
---|
38 | |
---|
39 | domain.stop() |
---|
40 | |
---|
41 | if run["return"] != 0: |
---|
42 | FAIL("Failed to verify that block dev is attached on DomainU") |
---|
Note: See
TracBrowser
for help on using the repository browser.