~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to tools/xm-test/tests/save/02_save_badparm_neg.py

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
# Copyright (C) International Business Machines Corp., 2005
 
4
# Author: Li Ge <lge@us.ibm.com> 
 
5
 
 
6
# Test description:
 
7
# Negative Test:
 
8
# Test for saving domain with non existent option in the command line.
 
9
# Verify fail.
 
10
 
 
11
import re
 
12
 
 
13
from XmTestLib import *
 
14
 
 
15
if ENABLE_HVM_SUPPORT:
 
16
    SKIP("Save currently not supported for HVM domains")
 
17
 
 
18
status, output = traceCommand("xm save -x")
 
19
eyecatcher1 = "Error:"
 
20
eyecatcher2 = "Traceback"
 
21
where1 = output.find(eyecatcher1)
 
22
where2 = output.find(eyecatcher2)
 
23
if status == 0:
 
24
    FAIL("xm save returned bad status, expected non 0, status is: %i" % status)
 
25
elif where2 == 0:
 
26
    FAIL("xm save returned a stack dump, expected nice error message") 
 
27
elif where1 == -1:
 
28
    FAIL("xm save returned bad output, expected Error:, output is: %s" % output)