Skip to contentSkip to conversation

Fix isConsoleDead() to match changes in Console.py

PATCH Applied Dan Smith 2 participants 2 messages Nov 28, 2005

lore
Share & tools
lore

Dan Smith

author
#0 lore raw

PATCH 1/1 Fix isConsoleDead() to match changes in Console.py

This patch fixes the isConsoleDead() routine so that it is again able to detect console system death. Since we can no longer tell if the system is dead by just attaching the console, we must try to run a command and watch for failure.

This makes 04_memset_smallmem detect the death and restart the console daemon, so that subsequent tests don't fail unnecessarily.

# HG changeset patch
# User [email protected]
# Node ID 1f519eb4eac992939922af1c6b75b8f3163dc540
# Parent 2eb868d02f0f8ee0964d6322c6585be6ce0de123
Fix isConsoleDead() to actually run a command on the DomU, since a dead console is no longer exposed when attempting to attach. This makes test 04_memset_smallmem again able to detect console death and restart xenconsoled so that the rest of the tests can run on x86_64.

tools/xm-test/lib/XmTestLib/Test.py +2 -0
diff -r 2eb868d02f0f -r 1f519eb4eac9 tools/xm-test/lib/XmTestLib/Test.py
@@ -174,9 +174,11 @@
     try:
         domain.start()
         console = XmConsole(domain.getName())
+        console.runCmd("ls")
     except DomainError, e:
         return True
     except ConsoleError, e:
+        domain.destroy()
         return True
 
     domain.destroy()
Signature · 5 lines
-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: [email protected]

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Applied
#1 lore raw
Quoted 7 lines · Dan Smith

This patch fixes the isConsoleDead() routine so that it is again able to detect console system death. Since we can no longer tell if the system is dead by just attaching the console, we must try to run a command and watch for failure.

This makes 04_memset_smallmem detect the death and restart the console daemon, so that subsequent tests don't fail unnecessarily.

Applied, thanks Dan.

Ewan.