aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test/tests/block-create/06_block_attach_baddomain_neg.py
blob: bd28bc18be1d76110c62fe10d4f802ad9ff44d1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python

# Copyright (C) International Business Machines Corp., 2005
# Author: Murillo F. Bernardes <mfb@br.ibm.com>

from XmTestLib import *

if ENABLE_VMX_SUPPORT:
    SKIP("Block-attach not supported for VMX domains")

status, output = traceCommand("xm block-attach NOT-EXIST phy:ram1 sdb1 w")

eyecatcher = "Error"
where = output.find(eyecatcher)
if status == 0:
	FAIL("xm block-attach returned bad status, expected non 0, status is: %i" % status )
elif where == -1:
	FAIL("xm block-attach returned bad output, expected Error, output is: %s" % output )