ia64/xen-unstable

changeset 7855:725bf42d4713

Review checks for Error string when checking that bad arguments are handled
correctly. Many checks were looking using output.find("Error") > 1, which is
incorrect, as we do not guarantee that the word "Error" will be first in the
output (never mind the fact that strings are indexed from 0).

All these checks have been changed to compare against -1. In particular, this
should fix the failure of create_noparm_neg and create_badparm_neg on a machine
with the /etc/xen/xmdefconfig file in place, as xm create issues the
Using config file "/etc/xen/xmdefconfig" diagnostic before reporting the error.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Wed Nov 16 12:36:47 2005 +0100 (2005-11-16)
parents 10bafcc750fb
children 50dcb6266990
files tools/xm-test/tests/block-create/06_block_attach_baddomain_neg.py tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py tools/xm-test/tests/console/01_console_badopt_neg.py tools/xm-test/tests/console/02_console_baddom_neg.py tools/xm-test/tests/create/02_create_noparm_neg.py tools/xm-test/tests/create/03_create_badparm_neg.py tools/xm-test/tests/create/05_create_noroot_noram_neg.py tools/xm-test/tests/destroy/02_destroy_noparm_neg.py tools/xm-test/tests/destroy/03_destroy_nonexist_neg.py tools/xm-test/tests/destroy/04_destroy_badparm_neg.py tools/xm-test/tests/dmesg/02_dmesg_basic_neg.py tools/xm-test/tests/help/01_help_basic_pos.py tools/xm-test/tests/help/02_help_basic_neg.py tools/xm-test/tests/help/03_help_badparm_neg.py tools/xm-test/tests/help/05_help_nonroot_pos.py tools/xm-test/tests/list/02_list_badparm_neg.py tools/xm-test/tests/list/03_list_nonexist_neg.py tools/xm-test/tests/list/06_list_nonroot.py tools/xm-test/tests/memset/02_memset_badparm_neg.py tools/xm-test/tests/pause/02_pause_badopt_neg.py tools/xm-test/tests/pause/03_pause_badname_neg.py tools/xm-test/tests/pause/04_pause_badid_neg.py tools/xm-test/tests/reboot/02_reboot_badopt_neg.py tools/xm-test/tests/reboot/03_reboot_badname_neg.py tools/xm-test/tests/restore/02_restore_badparm_neg.py tools/xm-test/tests/restore/03_restore_badfilename_neg.py tools/xm-test/tests/save/02_save_badparm_neg.py tools/xm-test/tests/save/03_save_bogusfile_neg.py tools/xm-test/tests/shutdown/02_shutdown_badparm_neg.py tools/xm-test/tests/shutdown/03_shutdown_nonexist_neg.py
line diff
     1.1 --- a/tools/xm-test/tests/block-create/06_block_attach_baddomain_neg.py	Tue Nov 15 19:19:02 2005 +0100
     1.2 +++ b/tools/xm-test/tests/block-create/06_block_attach_baddomain_neg.py	Wed Nov 16 12:36:47 2005 +0100
     1.3 @@ -11,7 +11,7 @@ eyecatcher = "Error"
     1.4  where = output.find(eyecatcher)
     1.5  if status == 0:
     1.6  	FAIL("xm block-attach returned bad status, expected non 0, status is: %i" % status )
     1.7 -elif where > 1:
     1.8 +elif where == -1:
     1.9  	FAIL("xm block-attach returned bad output, expected Error, output is: %s" % output )
    1.10  	
    1.11  
     2.1 --- a/tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py	Tue Nov 15 19:19:02 2005 +0100
     2.2 +++ b/tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py	Wed Nov 16 12:36:47 2005 +0100
     2.3 @@ -42,7 +42,7 @@ eyecatcher = "Error"
     2.4  where = output.find(eyecatcher)
     2.5  if status == 0:
     2.6  	FAIL("xm block-attach returned bad status, expected non 0, status is: %i" % status )
     2.7 -elif where > 1:
     2.8 +elif where == -1:
     2.9  	FAIL("xm block-attach returned bad output, expected Error, output is: %s" % output )
    2.10  
    2.11  try:
     3.1 --- a/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py	Tue Nov 15 19:19:02 2005 +0100
     3.2 +++ b/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py	Wed Nov 16 12:36:47 2005 +0100
     3.3 @@ -41,7 +41,7 @@ eyecatcher = "Error"
     3.4  where = output.find(eyecatcher)
     3.5  if status == 0:
     3.6  	FAIL("xm block-attach returned bad status, expected non 0, status is: %i" % status )
     3.7 -elif where > 1:
     3.8 +elif where == -1:
     3.9  	FAIL("xm block-attach returned bad output, expected Error, output is: %s" % output )
    3.10  	
    3.11  try:
     4.1 --- a/tools/xm-test/tests/console/01_console_badopt_neg.py	Tue Nov 15 19:19:02 2005 +0100
     4.2 +++ b/tools/xm-test/tests/console/01_console_badopt_neg.py	Wed Nov 16 12:36:47 2005 +0100
     4.3 @@ -17,5 +17,5 @@ eyecatcher = "Error"
     4.4  where = output.find(eyecatcher)
     4.5  if status == 0:
     4.6      FAIL("xm console returned invalid %i != 0" % status)
     4.7 -elif where > 1:
     4.8 +elif where == -1:
     4.9      FAIL("xm console didn't report error on bad argument")
     5.1 --- a/tools/xm-test/tests/console/02_console_baddom_neg.py	Tue Nov 15 19:19:02 2005 +0100
     5.2 +++ b/tools/xm-test/tests/console/02_console_baddom_neg.py	Wed Nov 16 12:36:47 2005 +0100
     5.3 @@ -15,7 +15,7 @@ eyecatcher = "Error"
     5.4  where = output.find(eyecatcher)
     5.5  if status == 0:
     5.6      FAIL("xm console returned invalid %i != 0" % status)
     5.7 -elif where > 1:
     5.8 +elif where == -1:
     5.9      FAIL("xm console failed to report error on bad domid")
    5.10  
    5.11  status, output = traceCommand("xm console NON_EXIST")
    5.12 @@ -23,5 +23,5 @@ eyecatcher = "Error"
    5.13  where = output.find(eyecatcher)
    5.14  if status == 0:
    5.15      FAIL("xm console returned invalid %i != 0" % status)
    5.16 -elif where > 1:
    5.17 +elif where == -1:
    5.18      FAIL("xm console failed to report error on bad domname") 
     6.1 --- a/tools/xm-test/tests/create/02_create_noparm_neg.py	Tue Nov 15 19:19:02 2005 +0100
     6.2 +++ b/tools/xm-test/tests/create/02_create_noparm_neg.py	Wed Nov 16 12:36:47 2005 +0100
     6.3 @@ -12,6 +12,6 @@ eyecatcher = "Error:"
     6.4  where = output.find(eyecatcher)
     6.5  if status == 0:
     6.6      FAIL("xm create returned invalid %i != 0" % status)
     6.7 -elif where > 1:
     6.8 +elif where == -1:
     6.9      FAIL("xm create failed to report error on missing args")
    6.10  
     7.1 --- a/tools/xm-test/tests/create/03_create_badparm_neg.py	Tue Nov 15 19:19:02 2005 +0100
     7.2 +++ b/tools/xm-test/tests/create/03_create_badparm_neg.py	Wed Nov 16 12:36:47 2005 +0100
     7.3 @@ -15,5 +15,5 @@ from XmTestLib import *
     7.4  status, output = traceCommand("xm create -x")
     7.5  eyecatcher = "Error:"
     7.6  where = output.find(eyecatcher)
     7.7 -if where != 0:
     7.8 +if where == -1:
     7.9      FAIL("xm create failed to report error on bad arg")
     8.1 --- a/tools/xm-test/tests/create/05_create_noroot_noram_neg.py	Tue Nov 15 19:19:02 2005 +0100
     8.2 +++ b/tools/xm-test/tests/create/05_create_noroot_noram_neg.py	Wed Nov 16 12:36:47 2005 +0100
     8.3 @@ -22,5 +22,5 @@ time.sleep(15)
     8.4  eyecatcher = "NOROOT"
     8.5  status, output = traceCommand("xm list")
     8.6  where = output.find(eyecatcher)
     8.7 -if where != -1 :
     8.8 +if where != -1:
     8.9  	FAIL("xm create test05 passed with no root and no ramdisk. Expected result: Fail.")
     9.1 --- a/tools/xm-test/tests/destroy/02_destroy_noparm_neg.py	Tue Nov 15 19:19:02 2005 +0100
     9.2 +++ b/tools/xm-test/tests/destroy/02_destroy_noparm_neg.py	Wed Nov 16 12:36:47 2005 +0100
     9.3 @@ -12,5 +12,5 @@ eyecatcher = "Error:"
     9.4  where = output.find(eyecatcher)
     9.5  if status == 0:
     9.6      FAIL("xm destroy returned invalid %i != 0" % status)
     9.7 -elif where > 1:
     9.8 +elif where == -1:
     9.9      FAIL("xm destroy failed to report error for missing arg")
    10.1 --- a/tools/xm-test/tests/destroy/03_destroy_nonexist_neg.py	Tue Nov 15 19:19:02 2005 +0100
    10.2 +++ b/tools/xm-test/tests/destroy/03_destroy_nonexist_neg.py	Wed Nov 16 12:36:47 2005 +0100
    10.3 @@ -12,5 +12,5 @@ eyecatcher = "Error:"
    10.4  where = output.find(eyecatcher)
    10.5  if status == 0:
    10.6      FAIL("xm destroy returned invalid %i != 0" % status)
    10.7 -elif where > 1:
    10.8 +elif where == -1:
    10.9      FAIL("xm destroy failed to report error for bad arg")
    11.1 --- a/tools/xm-test/tests/destroy/04_destroy_badparm_neg.py	Tue Nov 15 19:19:02 2005 +0100
    11.2 +++ b/tools/xm-test/tests/destroy/04_destroy_badparm_neg.py	Wed Nov 16 12:36:47 2005 +0100
    11.3 @@ -12,5 +12,5 @@ eyecatcher = "Error:"
    11.4  where = output.find(eyecatcher)
    11.5  if status == 0:
    11.6      FAIL("xm destroy returned invalid %i != 0" % status)
    11.7 -elif where > 1:
    11.8 +elif where == -1:
    11.9      FAIL("xm destroy failed to report error for bad domid")
    12.1 --- a/tools/xm-test/tests/dmesg/02_dmesg_basic_neg.py	Tue Nov 15 19:19:02 2005 +0100
    12.2 +++ b/tools/xm-test/tests/dmesg/02_dmesg_basic_neg.py	Wed Nov 16 12:36:47 2005 +0100
    12.3 @@ -12,6 +12,6 @@ eyecatcher = "Error:"
    12.4  where = output.find(eyecatcher)
    12.5  if status == 0:
    12.6      FAIL("xm dmesg returned invalid %i != 0" % status)
    12.7 -elif where == 1:
    12.8 +elif where == -1:
    12.9      FAIL("xm dmesg failed to report error for bad arg")
   12.10  
    13.1 --- a/tools/xm-test/tests/help/01_help_basic_pos.py	Tue Nov 15 19:19:02 2005 +0100
    13.2 +++ b/tools/xm-test/tests/help/01_help_basic_pos.py	Wed Nov 16 12:36:47 2005 +0100
    13.3 @@ -10,5 +10,5 @@ from XmTestLib import *
    13.4  status, output = traceCommand("xm help")
    13.5  eyecatcher = "Usage:"
    13.6  where = output.find(eyecatcher)
    13.7 -if where != 0:
    13.8 +if where == -1:
    13.9      FAIL("xm help: didn't see the usage string")
    14.1 --- a/tools/xm-test/tests/help/02_help_basic_neg.py	Tue Nov 15 19:19:02 2005 +0100
    14.2 +++ b/tools/xm-test/tests/help/02_help_basic_neg.py	Wed Nov 16 12:36:47 2005 +0100
    14.3 @@ -10,5 +10,5 @@ from XmTestLib import *
    14.4  status, output = traceCommand("xm")
    14.5  eyecatcher = "Usage:"
    14.6  where = output.find(eyecatcher)
    14.7 -if where != 0:
    14.8 +if where == -1:
    14.9      FAIL("xm: didn't display usage when given no arguments")
    15.1 --- a/tools/xm-test/tests/help/03_help_badparm_neg.py	Tue Nov 15 19:19:02 2005 +0100
    15.2 +++ b/tools/xm-test/tests/help/03_help_badparm_neg.py	Wed Nov 16 12:36:47 2005 +0100
    15.3 @@ -10,5 +10,5 @@ from XmTestLib import *
    15.4  status, output = traceCommand("xm -x")
    15.5  eyecatcher = "Error:"
    15.6  where = output.find(eyecatcher)
    15.7 -if where != 0:
    15.8 +if where == -1:
    15.9      FAIL("xm failed to report error for bad arg")
    16.1 --- a/tools/xm-test/tests/help/05_help_nonroot_pos.py	Tue Nov 15 19:19:02 2005 +0100
    16.2 +++ b/tools/xm-test/tests/help/05_help_nonroot_pos.py	Wed Nov 16 12:36:47 2005 +0100
    16.3 @@ -13,5 +13,5 @@ becomeNonRoot()
    16.4  status, output = traceCommand("xm help")
    16.5  eyecatcher = "Usage:"
    16.6  where = output.find(eyecatcher)
    16.7 -if where != 0:
    16.8 +if where == -1:
    16.9      FAIL("xm help: didn't see the usage string")
    17.1 --- a/tools/xm-test/tests/list/02_list_badparm_neg.py	Tue Nov 15 19:19:02 2005 +0100
    17.2 +++ b/tools/xm-test/tests/list/02_list_badparm_neg.py	Wed Nov 16 12:36:47 2005 +0100
    17.3 @@ -12,5 +12,5 @@ eyecatcher = "Error:"
    17.4  where = output.find(eyecatcher)
    17.5  if status == 0:
    17.6      FAIL("xm list returned invalud %i != 0" % status)
    17.7 -elif where > 1:
    17.8 +elif where == -1:
    17.9      FAIL("xm list failed to report error for bad arg")
    18.1 --- a/tools/xm-test/tests/list/03_list_nonexist_neg.py	Tue Nov 15 19:19:02 2005 +0100
    18.2 +++ b/tools/xm-test/tests/list/03_list_nonexist_neg.py	Wed Nov 16 12:36:47 2005 +0100
    18.3 @@ -12,6 +12,6 @@ eyecatcher = "Error:"
    18.4  where = output.find(eyecatcher)
    18.5  if status == 0:
    18.6      FAIL("xm list returned invalid %i != 0" % status)
    18.7 -elif where > 1:
    18.8 +elif where == -1:
    18.9      FAIL("xm list failed to report error for invalid domid")
   18.10  
    19.1 --- a/tools/xm-test/tests/list/06_list_nonroot.py	Tue Nov 15 19:19:02 2005 +0100
    19.2 +++ b/tools/xm-test/tests/list/06_list_nonroot.py	Wed Nov 16 12:36:47 2005 +0100
    19.3 @@ -11,5 +11,5 @@ becomeNonRoot()
    19.4  status, output = traceCommand("xm list")
    19.5  eyecatcher = "Error: Most commands need root access"
    19.6  where = output.find(eyecatcher)
    19.7 -if where != 0:
    19.8 +if where == -1:
    19.9      FAIL("xm help: didn't see the root hint, saw %s" % output)
    20.1 --- a/tools/xm-test/tests/memset/02_memset_badparm_neg.py	Tue Nov 15 19:19:02 2005 +0100
    20.2 +++ b/tools/xm-test/tests/memset/02_memset_badparm_neg.py	Wed Nov 16 12:36:47 2005 +0100
    20.3 @@ -24,7 +24,7 @@ eyecatcher = "Error:"
    20.4  where = output.find(eyecatcher)
    20.5  if status == 0:
    20.6      FAIL("xm mem-set returned invalid %i == 0" % status)
    20.7 -elif where > 1:
    20.8 +elif where == -1:
    20.9      FAIL("xm mem-set failed to report error for missing arg")
   20.10  
   20.11  # destroy non existent parm input - negative test
   20.12 @@ -32,7 +32,7 @@ status, output = traceCommand("xm mem-se
   20.13  where = output.find(eyecatcher)
   20.14  if status == 0:
   20.15      FAIL("xm mem-set returned invalid %i == 0" % status)
   20.16 -elif where != 0:
   20.17 +elif where == -1:
   20.18      FAIL("xm mem-set failed to report error for bad arg")
   20.19  
   20.20  # destroy non existent domain - negative test
   20.21 @@ -40,14 +40,14 @@ status, output = traceCommand("xm mem-se
   20.22  where = output.find(eyecatcher)
   20.23  if status == 0:
   20.24      FAIL("xm mem-set returned invalid %i == 0" % status)
   20.25 -elif where != 0:
   20.26 +elif where == -1:
   20.27      FAIL("xm mem-set failed to report error for invalid domid")
   20.28  
   20.29  # destroy non existent domain and memory - negative test
   20.30  status, output = traceCommand("xm mem-set 6666 64")
   20.31  where = output.find(eyecatcher)
   20.32  if status == 0:
   20.33 -    FAIL("xm mem-set returned invalid %i != 0" % status)
   20.34 -elif where != 0:
   20.35 +    FAIL("xm mem-set returned invalid %i == -1" % status)
   20.36 +elif where == -1:
   20.37      FAIL("xm mem-set failed to report error for invalid domid")
   20.38  
    21.1 --- a/tools/xm-test/tests/pause/02_pause_badopt_neg.py	Tue Nov 15 19:19:02 2005 +0100
    21.2 +++ b/tools/xm-test/tests/pause/02_pause_badopt_neg.py	Wed Nov 16 12:36:47 2005 +0100
    21.3 @@ -25,7 +25,7 @@ where = output.find(eyecatcher)
    21.4  if status == 0:
    21.5      domain.destroy()
    21.6      FAIL("xm pause returned bad status, expected non 0, status is: %i" % status )
    21.7 -elif where > 1:
    21.8 +elif where == -1:
    21.9      domain.destroy()
   21.10      FAIL("xm pause returned bad output, expected Error, output is: %s" % output )
   21.11  
    22.1 --- a/tools/xm-test/tests/pause/03_pause_badname_neg.py	Tue Nov 15 19:19:02 2005 +0100
    22.2 +++ b/tools/xm-test/tests/pause/03_pause_badname_neg.py	Wed Nov 16 12:36:47 2005 +0100
    22.3 @@ -14,5 +14,5 @@ eyecatcher = "Error"
    22.4  where = output.find(eyecatcher)
    22.5  if status == 0:
    22.6      FAIL("xm pause returned bad status, expected non 0, status is: %i" % status )
    22.7 -elif where > 1:
    22.8 +elif where == -1:
    22.9      FAIL("xm pause returned bad output, expected Error, output is: %s" % output )
    23.1 --- a/tools/xm-test/tests/pause/04_pause_badid_neg.py	Tue Nov 15 19:19:02 2005 +0100
    23.2 +++ b/tools/xm-test/tests/pause/04_pause_badid_neg.py	Wed Nov 16 12:36:47 2005 +0100
    23.3 @@ -14,5 +14,5 @@ eyecatcher = "Error"
    23.4  where = output.find(eyecatcher)
    23.5  if status == 0:
    23.6      FAIL("xm pause returned bad status, expected non 0, status is: %i" % status )
    23.7 -elif where > 1:
    23.8 +elif where == -1:
    23.9      FAIL("xm pause returned bad output, expected Error, output is: %s" % output )
    24.1 --- a/tools/xm-test/tests/reboot/02_reboot_badopt_neg.py	Tue Nov 15 19:19:02 2005 +0100
    24.2 +++ b/tools/xm-test/tests/reboot/02_reboot_badopt_neg.py	Wed Nov 16 12:36:47 2005 +0100
    24.3 @@ -25,7 +25,7 @@ where = output.find(eyecatcher)
    24.4  if status == 0:
    24.5      domain.destroy()
    24.6      FAIL("xm reboot returned invalid %i == 0" % status )
    24.7 -elif where > 1:
    24.8 +elif where == -1:
    24.9      domain.destroy()
   24.10      FAIL("xm reboot failed to report error for bad arg")
   24.11  
    25.1 --- a/tools/xm-test/tests/reboot/03_reboot_badname_neg.py	Tue Nov 15 19:19:02 2005 +0100
    25.2 +++ b/tools/xm-test/tests/reboot/03_reboot_badname_neg.py	Wed Nov 16 12:36:47 2005 +0100
    25.3 @@ -14,5 +14,5 @@ eyecatcher = "Error"
    25.4  where = output.find(eyecatcher)
    25.5  if status == 0:
    25.6      FAIL("xm reboot returned invalid %i == 0" % status )
    25.7 -elif where > 1:
    25.8 +elif where == -1:
    25.9      FAIL("xm reboot failed to report error for non-existent domain" )
    26.1 --- a/tools/xm-test/tests/restore/02_restore_badparm_neg.py	Tue Nov 15 19:19:02 2005 +0100
    26.2 +++ b/tools/xm-test/tests/restore/02_restore_badparm_neg.py	Wed Nov 16 12:36:47 2005 +0100
    26.3 @@ -21,5 +21,5 @@ if status == 0:
    26.4      FAIL("xm restore returned bad status, expected non 0, status is: %i" % status)
    26.5  elif where2 == 0:
    26.6      FAIL("xm restore returned a stack dump, expected nice error message") 
    26.7 -elif where1 > 0:
    26.8 +elif where1 == -1:
    26.9      FAIL("xm restore returned bad output, expected Error:, output is: %s" % output)
    27.1 --- a/tools/xm-test/tests/restore/03_restore_badfilename_neg.py	Tue Nov 15 19:19:02 2005 +0100
    27.2 +++ b/tools/xm-test/tests/restore/03_restore_badfilename_neg.py	Wed Nov 16 12:36:47 2005 +0100
    27.3 @@ -21,5 +21,5 @@ if status == 0:
    27.4      FAIL("xm restore returned bad status, expected non 0, status is: %i" % status)
    27.5  elif where2 == 0:
    27.6      FAIL("xm restore returned a stack dump, expected nice error message") 
    27.7 -elif where1 > 0:
    27.8 +elif where1 == -1:
    27.9      FAIL("xm restore returned bad output, expected Error:, output is: %s" % output)
    28.1 --- a/tools/xm-test/tests/save/02_save_badparm_neg.py	Tue Nov 15 19:19:02 2005 +0100
    28.2 +++ b/tools/xm-test/tests/save/02_save_badparm_neg.py	Wed Nov 16 12:36:47 2005 +0100
    28.3 @@ -21,5 +21,5 @@ if status == 0:
    28.4      FAIL("xm save returned bad status, expected non 0, status is: %i" % status)
    28.5  elif where2 == 0:
    28.6      FAIL("xm save returned a stack dump, expected nice error message") 
    28.7 -elif where1 > 0:
    28.8 +elif where1 == -1:
    28.9      FAIL("xm save returned bad output, expected Error:, output is: %s" % output)
    29.1 --- a/tools/xm-test/tests/save/03_save_bogusfile_neg.py	Tue Nov 15 19:19:02 2005 +0100
    29.2 +++ b/tools/xm-test/tests/save/03_save_bogusfile_neg.py	Wed Nov 16 12:36:47 2005 +0100
    29.3 @@ -38,5 +38,5 @@ if status == 0:
    29.4      FAIL("xm save returned bad status, expected non 0, status is: %i" % status)
    29.5  elif where1 == 0:
    29.6      FAIL("xm save returned a stack dump, expected nice error message")
    29.7 -elif where2 > 0:
    29.8 +elif where2 == -1:
    29.9      FAIL("xm save returned bad output, expected Error:, output is: %s" % output)
    30.1 --- a/tools/xm-test/tests/shutdown/02_shutdown_badparm_neg.py	Tue Nov 15 19:19:02 2005 +0100
    30.2 +++ b/tools/xm-test/tests/shutdown/02_shutdown_badparm_neg.py	Wed Nov 16 12:36:47 2005 +0100
    30.3 @@ -32,7 +32,7 @@ ret, output = traceCommand("xm shutdown 
    30.4  where = output.find(eyecatcher)
    30.5  if (ret == 0):
    30.6      FAIL("xm shutdown returned invalid %i == 0" % ret)
    30.7 -elif where != 0:
    30.8 +elif where == -1:
    30.9      FAIL("xm shutdown failed to report error for bad arg")
   30.10  
   30.11  # Stop the domain (nice shutdown)
    31.1 --- a/tools/xm-test/tests/shutdown/03_shutdown_nonexist_neg.py	Tue Nov 15 19:19:02 2005 +0100
    31.2 +++ b/tools/xm-test/tests/shutdown/03_shutdown_nonexist_neg.py	Wed Nov 16 12:36:47 2005 +0100
    31.3 @@ -18,5 +18,5 @@ ret, output = traceCommand("xm shutdown 
    31.4  where = output.find(eyecatcher)
    31.5  if (ret == 0):
    31.6      FAIL("xm shutdown returned invalid %i == 0" % ret)
    31.7 -elif where != 0:
    31.8 +elif where == -1:
    31.9      FAIL("xm shutdown failed to report error for bad domid")