Author: gnichols
Date: 2011-04-18 16:44:02 +0000 (Mon, 18 Apr 2011)
New Revision: 887
Modified:
trunk/tests/reboot/reboot.py
Log:
626970 - FEAT: kdump test needs to verify kdump
Modified: trunk/tests/reboot/reboot.py
===================================================================
--- trunk/tests/reboot/reboot.py 2011-04-18 16:43:08 UTC (rev 886)
+++ trunk/tests/reboot/reboot.py 2011-04-18 16:44:02 UTC (rev 887)
@@ -53,8 +53,8 @@
return tests
def verify(self):
- if self.getLogicalDevice == Constants.nfs and (self.getTestServer() == None or self.getTestServer() == "unknown"):
- print "Reboot test for %s failed verification: No test server was set." % self.getLogicalDevice()
+ if self.getLogicalDeviceName() == Constants.nfs and (self.getTestServer() == None or self.getTestServer() == "unknown"):
+ print "Reboot test for %s failed verification: No test server was set." % self.getLogicalDeviceName()
return False
return True
@@ -127,7 +127,7 @@
else:
print "Network Dump set to %s" % net
elif self.getLogicalDeviceName() == Constants.nfs:
- if self.getTestServer():
+ if self.getTestServer() and self.getTestServer() != "unknown":
net = "%s:/var/v7/export" % self.getTestServer()
print "Adding net %s to %s" % (net, self.kdumpConfigPath)
configFile.addParameter("net", net)
@@ -210,7 +210,7 @@
def verifyKDumpImage(self):
imageDirectory = self.getImageDirectory()
- if not imageDirectory():
+ if not imageDirectory:
return False
# find the vmcore image file matching the timestamp
@@ -265,12 +265,15 @@
# if nfs network dump, mount the filesystem
net = configFile.getParameter("net")
if net:
- print "Attempting to mount net setting %s as nfs."
+ print "Attempting to mount net setting %s as nfs." % net
try:
localPath = "v7-net"
Command("mkdir %s" % localPath).echo()
- Command("mount %s %s" % (net, localPath).echo())
- imageDirectory = os.path.join(localPath, imageDirectory)
+ Command("mount %s %s" % (net, localPath)).echo()
+ if os.path.isabs(imageDirectory):
+ imageDirectory = localPath + imageDirectory
+ else:
+ imageDirectory = os.path.join(localPath, imageDirectory)
except V7CommandException, exception:
print "Error: could not mount nfs image directory"
print exception