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:
891 bytes
|
Rev | Line | |
---|
[34] | 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("Block-attach not supported for HVM domains") |
---|
| 10 | |
---|
| 11 | # Mount /dev/ram0 |
---|
| 12 | |
---|
| 13 | s, o = traceCommand("mkfs /dev/ram0") |
---|
| 14 | if s != 0: |
---|
| 15 | FAIL("Unable to mkfs /dev/ram0") |
---|
| 16 | |
---|
| 17 | s, o = traceCommand("mkdir -p mnt"); |
---|
| 18 | if s != 0: |
---|
| 19 | FAIL("Unable to create ./mnt") |
---|
| 20 | |
---|
| 21 | s, o = traceCommand("mount /dev/ram0 mnt -o rw") |
---|
| 22 | if s != 0: |
---|
| 23 | FAIL("Unable to mount /dev/ram0 on ./mnt") |
---|
| 24 | |
---|
| 25 | # Now try to start a DomU with write access to /dev/ram0 |
---|
| 26 | |
---|
| 27 | config = {"disk":"phy:/dev/ram0,xvda1,w"} |
---|
| 28 | |
---|
| 29 | domain = XmTestDomain(extraConfig=config); |
---|
| 30 | |
---|
| 31 | try: |
---|
| 32 | domain.start() |
---|
| 33 | s, o = traceCommand("umount mnt") |
---|
| 34 | FAIL("Bug #331: Started a DomU with write access to a rw mounted block device") |
---|
| 35 | except DomainError, e: |
---|
| 36 | s, o = traceCommand("umount mnt") |
---|
| 37 | |
---|
| 38 | domain.destroy() |
---|
Note: See
TracBrowser
for help on using the repository browser.