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-changelog

[Xen-changelog] Add test for the last unresolved bit of bug #416. Check

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add test for the last unresolved bit of bug #416. Check that
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 02 Dec 2005 03:00:06 +0000
Delivery-date: Fri, 02 Dec 2005 03:00:17 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User dan@xxxxxxxxxxxxxxxxxxxxx
# Node ID 36f09499bd8c75595a85cec1951d1b7b7d8a347d
# Parent  c55ac1858bbce73be3be7ee436765cf25d33bdbf
Add test for the last unresolved bit of bug #416.  Check that
"xm list --long" reflects removed devices.

diff -r c55ac1858bbc -r 36f09499bd8c 
tools/xm-test/tests/block-destroy/Makefile.am
--- a/tools/xm-test/tests/block-destroy/Makefile.am     Thu Dec  1 10:27:27 2005
+++ b/tools/xm-test/tests/block-destroy/Makefile.am     Thu Dec  1 11:15:31 2005
@@ -5,7 +5,8 @@
        02_block-destroy_rtblock_pos.test       \
        03_block-destroy_nonexist_neg.test      \
        04_block-destroy_nonattached_neg.test   \
-       05_block-destroy_byname_pos.test
+       05_block-destroy_byname_pos.test        \
+       06_block-destroy_check_list_pos.test
 
 XFAIL_TESTS = 
 
diff -r c55ac1858bbc -r 36f09499bd8c 
tools/xm-test/tests/block-destroy/06_block-destroy_check_list_pos.py
--- /dev/null   Thu Dec  1 10:27:27 2005
+++ b/tools/xm-test/tests/block-destroy/06_block-destroy_check_list_pos.py      
Thu Dec  1 11:15:31 2005
@@ -0,0 +1,58 @@
+#!/usr/bin/python
+
+# Copyright (C) International Business Machines Corp., 2005
+# Author: Dan Smith <danms@xxxxxxxxxx>
+
+from XmTestLib import *
+
+import time
+import re
+
+def checkBlockList(domain):
+    s, o = traceCommand("xm block-list %s" % domain.getName())
+    if s != 0:
+        FAIL("block-list failed")
+    if re.search("769", o):
+        return True
+    else:
+        return False
+
+def checkXmLongList(domain):
+    s, o = traceCommand("xm list --long %s" % domain.getName())
+    if s != 0:
+        FAIL("xm list --long <dom> failed")
+    if re.search("hda1", o):
+        return True
+    else:
+        return False
+
+domain = XmTestDomain()
+
+try:
+    domain.start()
+except DomainError,e:
+    FAIL(str(e))
+
+s, o = traceCommand("xm block-attach %s phy:/dev/ram0 hda1 w" % 
domain.getName())
+if s != 0:
+    FAIL("block-attach failed")
+
+if not checkBlockList(domain):
+    FAIL("block-list does not show that hda1 was attached")
+
+if not checkXmLongList(domain):
+    FAIL("xm long list does not show that hda1 was attached")
+
+s, o = traceCommand("xm block-detach %s hda1" % domain.getName())
+if s != 0:
+    FAIL("block-detach failed")
+
+time.sleep(2)
+
+if checkBlockList(domain):
+    FAIL("block-list does not show that hda1 was removed")
+
+if checkXmLongList(domain):
+    FAIL("xm long list does not show that hda1 was removed")
+
+

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add test for the last unresolved bit of bug #416. Check that, Xen patchbot -unstable <=