debuggers.hg

view tools/xm-test/tests/restore/02_restore_badparm_neg.py @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
1 #!/usr/bin/python
3 # Copyright (C) International Business Machines Corp., 2005
4 # Author: Li Ge <lge@us.ibm.com>
6 # Test description:
7 # Negative Test:
8 # Test for restoring domain with non existent option in the command line.
9 # Verify fail.
11 import re
13 from XmTestLib import *
15 if ENABLE_HVM_SUPPORT:
16 SKIP("Restore currently not supported for HVM domains")
18 status, output = traceCommand("xm restore -x")
19 eyecatcher1 = "Error:"
20 eyecatcher2 = "Traceback"
21 where1 = output.find(eyecatcher1)
22 where2 = output.find(eyecatcher2)
23 if status == 0:
24 FAIL("xm restore returned bad status, expected non 0, status is: %i" % status)
25 elif where2 == 0:
26 FAIL("xm restore returned a stack dump, expected nice error message")
27 elif where1 == -1:
28 FAIL("xm restore returned bad output, expected Error:, output is: %s" % output)