WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH][XM-TEST] Fix test 04_block_attach

To: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][XM-TEST] Fix test 04_block_attach
From: Dan Smith <danms@xxxxxxxxxx>
Date: Fri, 11 Nov 2005 10:46:23 -0800
Delivery-date: Fri, 11 Nov 2005 18:46:31 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)
Now that this test fails for the right reason, another bug is
revealed: #397.

Signed-off-by: Dan Smith <danms@xxxxxxxxxx>

# HG changeset patch
# User dan@xxxxxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 469dddcc907d0b79589c3e465cd59024acce9daf
# Parent  e912f2e9b755bf8ce7d798867b3678759fa0df85
This test was failing for he wrong reason.  Calls to block-attach after the
first *should* report failure, so the test should not fail because of this.  
The test now fails because multiple calls to block-attach seem to detach the
block devicem, which is wrong.

diff -r e912f2e9b755 -r 469dddcc907d 
tools/xm-test/tests/block-create/04_block_attach_device_repeatedly_pos.py
--- a/tools/xm-test/tests/block-create/04_block_attach_device_repeatedly_pos.py 
Fri Nov 11 17:05:20 2005
+++ b/tools/xm-test/tests/block-create/04_block_attach_device_repeatedly_pos.py 
Fri Nov 11 18:44:56 2005
@@ -38,11 +38,13 @@
     
 for i in range(10):
        status, output = traceCommand("xm block-attach %s phy:ram1 sdb1 w" % 
domain.getName())
-       if status != 0:
-               FAIL("xm block-attach returned invalid %i != 0" % status)
+        if i == 0 and status != 0:
+            FAIL("xm block attach returned invalid %i != 0" % status)
+       if i > 0 and status == 0:
+            FAIL("xm block-attach (repeat) returned invalid %i > 0" % status)
        run = console.runCmd("cat /proc/partitions")
        if not re.search("sdb1", run['output']):
-               FAIL("Device is not actually attached to domU")
+            FAIL("Device is not actually attached to domU")
 
 # Close the console
 console.closeConsole()

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@xxxxxxxxxx


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>