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

« back to all changes in this revision

Viewing changes to tools/xm-test/tests/memmax/01_memmax_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: Woody Marvel <marvel@us.ibm.com>
 
5
## Description: Test xm memmax bad parameter
 
6
 
 
7
import re
 
8
 
 
9
from XmTestLib import *
 
10
 
 
11
if ENABLE_HVM_SUPPORT:
 
12
    SKIP("Mem-max not supported for HVM domains")
 
13
 
 
14
status, output = traceCommand("xm mem-max")
 
15
eyecatcher = "Error:"
 
16
where = output.find(eyecatcher)
 
17
if status == 0:
 
18
    FAIL("xm memmax returned invalid %i == 0" % status)
 
19
elif where < 0:
 
20
    FAIL("xm memmax failed to report error for missing arg")
 
21
 
 
22
 
 
23
status, output = traceCommand("xm mem-max 6666")
 
24
eyecatcher = "Error:"
 
25
where = output.find(eyecatcher)
 
26
if status == 0:
 
27
    FAIL("xm memmax returned invalid %i == 0" % status)
 
28
elif where < 0:
 
29
    FAIL("xm memmax failed to report error for bad arg")