source: trunk/packages/xen-3.1/xen-3.1/tools/xm-test/tests/restore/03_restore_badfilename_neg.py @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

  • Property svn:mime-type set to text/script
File size: 810 bytes
Line 
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 restoring domain with non existent file.
9# Verify fail.
10
11import re
12
13from XmTestLib import *
14
15if ENABLE_HVM_SUPPORT:
16    SKIP("Restore currently not supported for HVM domains")
17
18status, output = traceCommand("xm restore /tmp/NON_EXIST")
19eyecatcher1 = "Error:"
20eyecatcher2 = "Traceback"
21where1 = output.find(eyecatcher1)
22where2 = output.find(eyecatcher2)
23if status == 0:
24    FAIL("xm restore returned bad status, expected non 0, status is: %i" % status)
25elif where2 == 0:
26    FAIL("xm restore returned a stack dump, expected nice error message")
27elif where1 == -1:
28    FAIL("xm restore returned bad output, expected Error:, output is: %s" % output)
Note: See TracBrowser for help on using the repository browser.