chiark / gitweb /
Truncate files when writing them (!); fix message not to have spurious \; reset signa...
[autopkgtest.git] / virt-subproc / adt-virt-xenlvm
index a4a1ec5032d1d38780d0b53b0ee6bdad1d8e38ee..dc9795d3112a0003ac346c330a98a99476ba895f 100755 (executable)
@@ -3,7 +3,7 @@
 # adt-virt-xenlvm is part of autopkgtest
 # autopkgtest is a tool for testing Debian binary packages
 #
-# autopkgtest is Copyright (C) 2006 Canonical Ltd.
+# autopkgtest is Copyright (C) 2006-2007 Canonical Ltd.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -90,9 +90,9 @@ def do_open():
                withholder.stdin.close()
                withholder.stdout.close()
                withholder = None
-               bomb("with-testbed failed, code %d" % rc)
+               vsp.bomb("with-testbed failed, code %d" % rc)
        if l != "y\n":
-               bomb("with-testbed sh gave wrong output `%s', not `l'"
+               vsp.bomb("with-testbed sh gave wrong output `%s', not `l'"
                        % l.rstrip("\n"))
        vsp.execute('mkdir %s' % downtmp, downp=True)   
 
@@ -103,7 +103,8 @@ def do_close():
        withholder.stdout.close()
        rc = withholder.wait()
        withholder = None
-       if rc: bomb("with-testbed failed when closing/resetting, code %d" % rc)
+       if rc: vsp.bomb("with-testbed failed when closing/reverting,"
+                       " code %d" % rc)
 
 def hook_forked_inchild():
        if withholder is not None:
@@ -115,8 +116,8 @@ def hook_open():
        do_open()
        return downtmp
 
-def hook_reset():
-       check_pause('reset')
+def hook_revert():
+       check_pause('revert')
        do_close()
        do_open()
 
@@ -127,7 +128,7 @@ def hook_cleanup():
                do_close()
 
 def hook_capabilities():
-       return ['revert','root-on-testbed','suggest-normal-user=adtxenu']
+       return ['revert','root-on-testbed','suggested-normal-user=adtxenu']
 
 parse_args()
 vsp.main()