mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
in XenDomain. The devices we will add, like network, will need to run console commands when a domain is started. So I have made console be a part of domain object, which it's tied to anyway. Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
42 lines
912 B
Python
42 lines
912 B
Python
#!/usr/bin/python
|
|
|
|
# Copyright (C) International Business Machines Corp., 2005
|
|
# Author: Li Ge <lge@us.ibm.com>
|
|
|
|
# Test Description:
|
|
# Negative Test:
|
|
# Test for creating domains with same name. Verify fail.
|
|
|
|
import sys
|
|
import re
|
|
|
|
from XmTestLib import *
|
|
|
|
# Create a domain with name "default" (default XmTestDomain, with our ramdisk)
|
|
domain1 = XmTestDomain("default")
|
|
|
|
#start it
|
|
try:
|
|
domain1.start(noConsole=True)
|
|
except DomainError, e:
|
|
if verbose:
|
|
print "Failed to create test domain1 because:"
|
|
print e.extra
|
|
FAIL(str(e))
|
|
|
|
# Create second domain with same name "default"
|
|
domain2 = XmTestDomain("default")
|
|
|
|
#start it
|
|
eyecatcher = "Pass"
|
|
try:
|
|
domain2.start(noConsole=True)
|
|
except DomainError, e:
|
|
eyecatcher = "Fail"
|
|
# Stop the domain1 (nice shutdown)
|
|
domain1.stop()
|
|
|
|
if eyecatcher != "Fail":
|
|
domain2.stop()
|
|
FAIL("xm create let me create a duplicate-named domain!")
|