r811 - in trunk: tests/info v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-03-11 13:23:13 +0000 (Fri, 11 Mar 2011)
New Revision: 811
Modified:
trunk/tests/info/info.py
trunk/v7/tags.py
Log:
676239 - v7 Coverage for loading Tech Preview device drivers in RHEL6.1
Modified: trunk/tests/info/info.py
===================================================================
--- trunk/tests/info/info.py 2011-03-11 13:18:40 UTC (rev 810)
+++ trunk/tests/info/info.py 2011-03-11 13:23:13 UTC (rev 811)
@@ -66,6 +66,8 @@
success = False
if tainted & Constants.TAINT_PROPRIETARY_MODULE:
print "Please remove the non-GPL modules."
+ if tainted & Constants.TAINT_TECHPREVIEW_MODULE:
+ print "Tech-preview modules:\n %s" % Command("cat /proc/modules|grep '(T)'").getString()
if tainted & Constants.TAINT_UNSIGNED_MODULE:
print "Unsigned modules:\n %s" % Command("cat /proc/modules|grep '(U)'").getString()
taintedFile.close()
Modified: trunk/v7/tags.py
===================================================================
--- trunk/v7/tags.py 2011-03-11 13:18:40 UTC (rev 810)
+++ trunk/v7/tags.py 2011-03-11 13:23:13 UTC (rev 811)
@@ -167,6 +167,7 @@
rt="rt"
TAINT_PROPRIETARY_MODULE = 1
TAINT_UNSIGNED_MODULE = 64 #kernel.h calls this TAINT_USER?
+ TAINT_TECHPREVIEW_MODULE = 256
i386="i386"
x86_64="x86_64"
interactive="interactive"
13 years, 2 months
r810 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-03-11 13:18:40 +0000 (Fri, 11 Mar 2011)
New Revision: 810
Modified:
trunk/v7/hardwaretest.py
Log:
682969 - v7 certify test have no return value
Modified: trunk/v7/hardwaretest.py
===================================================================
--- trunk/v7/hardwaretest.py 2011-03-11 13:16:04 UTC (rev 809)
+++ trunk/v7/hardwaretest.py 2011-03-11 13:18:40 UTC (rev 810)
@@ -814,11 +814,13 @@
# otherwise overriding verification failure, or passed verification and user continue
if not verified or self.ui.promptConfirm("Run these tests?") or self.options.mode == Constants.auto:
- self._doRun(tests)
+ return self._doRun(tests)
elif self.options.mode == Constants.auto:
print "There are no outstanding non-interactive tests"
else:
print "Testing appears to be complete."
+
+ return True
def doVerify(self):
""" run tests configuration verification code """
13 years, 2 months
r809 - in trunk: tests/reboot v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-03-11 13:16:04 +0000 (Fri, 11 Mar 2011)
New Revision: 809
Added:
trunk/v7/configfile.py
Modified:
trunk/tests/reboot/reboot.py
trunk/v7/continuation.py
trunk/v7/tags.py
Log:
626970 - FEAT: kdump test needs to verify kdump
Modified: trunk/tests/reboot/reboot.py
===================================================================
--- trunk/tests/reboot/reboot.py 2011-03-11 13:14:36 UTC (rev 808)
+++ trunk/tests/reboot/reboot.py 2011-03-11 13:16:04 UTC (rev 809)
@@ -14,7 +14,7 @@
#
# Author: Greg Nichols <gnichols(a)redhat.com>
-import os, string, sys, time, syslog
+import os, string, sys, time, syslog, re
from v7.tags import Constants, DeviceClass, TestTag
from v7.test import Test
@@ -23,6 +23,7 @@
from v7.environment import Environment
from v7.documentbase import DocumentWrapper
from v7.continuation import Continuation
+from v7.configfile import ConfigFile
class RebootTest(Test):
@@ -97,8 +98,10 @@
if not self.promptConfirm("Ready to restart?"):
return False
- # set up restart, and log start time
- self.continuation.setInitConfig(marker=self.Name())
+ # set up restart, and log start time
+ method = Constants.reboot
+ if usePanic: method = Constants.panic
+ self.continuation.setInitConfig(self.Name(), method)
# we need a delay here to give v7 time to finish writing results.xml
sys.stdout.flush()
@@ -125,6 +128,55 @@
time.sleep(waitTime)
print "Error: %s took too long" % mode
return False
+
+ def verifyKDumpImage(self):
+ # parse /etc/kdump.conf to find the location of the image file
+ configFile = ConfigFile("/etc/kdump.conf")
+ imageDirectory = configFile.getParameter("path")
+ if not imageDirectory:
+ imageDirectory = "/var/crash"
+
+ # find the vmcore image file matching the timestamp
+ # vmcore directories are like this: 127.0.0.1-2011-03-10-13:18:27
+ vmcoreDirectoryPattern = re.compile("(?P<ipaddr>[0-9]+\.[0-9]+\.[0-9]+)-(?P<date>[0-9]+-[0-9]+-[0-9]+)-(?P<time>[0-9]+:[0-9]+:[0-9]+)")
+ minimumDuration = None
+ directoryMatch = None
+ for (root,dirs,files) in os.walk(imageDirectory):
+ for dir in dirs:
+ match = vmcoreDirectoryPattern.search(dir)
+ if match:
+ timestamp = "%s %s" % (match.group("date"), match.group("time"))
+ duration = self.continuation.getDuration(timestamp)
+ print "%s took %s" % (dir, duration)
+ if not directoryMatch or (duration.seconds < minimumDuration):
+ minimumDuration = duration.seconds
+ directoryMatch = dir
+ # accept it if it's less than reboot time limit
+ if directoryMatch and (minimumDuration < self.rebootTimeLimit*60):
+ vmcorePath = os.path.join(imageDirectory, directoryMatch, "vmcore")
+ print "Found kdump image: " + vmcorePath
+ else:
+ print "Error: could not locate vmcore file"
+ if directoryMatch:
+ print "Closest match is " + os.path.join(imageDirectory, directoryMatch, "vmcore")
+ print "Reboot timestamp: " + self.continuation.getTimestamp()
+ return False
+
+ # run crash to see if it's a valid image
+ try:
+ # just run crash on it and quit, then look for the return value
+ crash = Command("echo \"q\" | crash %s /usr/lib/debug/lib/modules/`uname -r`/vmlinux" % vmcorePath)
+ crash.echo()
+ # if we get here, it must be OK
+ print "kdump image %s verified"% vmcorePath
+ return True
+ except V7CommandException, exception:
+ print "Error: could not verify kdump image %s" % vmcorePath
+ print exception
+ crash.printErrors()
+
+ return False
+
def run(self):
PASSED = 0
@@ -133,6 +185,8 @@
if self.incomplete:
result = self.continuation.verify(marker=self.Name())
self.continuation.removeInitConfig()
+ if self.continuation.getMethod() == Constants.panic:
+ result = self.verifyKDumpImage()
else:
result = self.reboot()
Added: trunk/v7/configfile.py
===================================================================
--- trunk/v7/configfile.py (rev 0)
+++ trunk/v7/configfile.py 2011-03-11 13:16:04 UTC (rev 809)
@@ -0,0 +1,63 @@
+# Copyright (c) 2006 Red Hat, Inc. All rights reserved. This copyrighted material
+# is made available to anyone wishing to use, modify, copy, or
+# redistribute it subject to the terms and conditions of the GNU General
+# Public License v.2.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Greg Nichols
+#
+
+# parse simple configles of the form:
+
+# <parametername> <value(s)>
+
+class ConfigFile():
+
+ def __init__(self, filePath):
+ self.filePath = filePath
+ self.parameters = None
+
+ def __parse(self):
+ file = open(self.filePath)
+ for line in file.readlines():
+ # skip comment lines
+ if line.strip() and line.strip()[0] == "#":
+ continue
+ words = line.strip().split(" ")
+ if words[0]:
+ if not self.parameters:
+ self.parameters = dict()
+ self.parameters[words[0]] = " ".join(words[1:])
+ file.close()
+
+ def getParameter(self, name):
+ if not self.parameters:
+ self.__parse()
+ if self.parameters:
+ try:
+ return self.parameters["name"]
+ except KeyError:
+ pass
+ return None
+
+ def dump(self):
+ if not self.parameters:
+ self.__parse()
+ if self.parameters:
+ for key in self.parameters:
+ print "%s = %s" % (key, self.parameters[key])
+if __name__ == "__main__":
+ try:
+ confFile = ConfigFile("/etc/rc.local")
+ confFile.dump()
+ except Exception, exception:
+ print exception
+ exit(1)
+ exit(0)
\ No newline at end of file
Modified: trunk/v7/continuation.py
===================================================================
--- trunk/v7/continuation.py 2011-03-11 13:14:36 UTC (rev 808)
+++ trunk/v7/continuation.py 2011-03-11 13:16:04 UTC (rev 809)
@@ -30,20 +30,26 @@
self.environment = environment
self.documentWrapper = DocumentWrapper()
self.rebootTimeLimit = 10 # minutes
+ self.method = None
+ self.timestamp = None
- def setInitConfig(self, marker):
+ def setInitConfig(self, marker, method=None):
+ if method:
+ self.method = method
chkconfig = Command("chkconfig --add v7")
chkconfig.echo()
# get a timestamo, save it
- theTime = time.gmtime(time.time())
- runTimeStamp = self.documentWrapper.timeToString(theTime)
+ theTime = time.localtime(time.time())
+ self.timestamp = self.documentWrapper.timeToString(theTime)
# save it off to the side
timestamp = open(os.path.join(self.environment.getDataDirectory(), "bootprint"), "w")
- timestamp.write(runTimeStamp + "\n")
+ timestamp.write(self.timestamp + "\n")
+ if self.method:
+ timestamp.write(self.method + "\n")
timestamp.close()
# mark the log with this run time
- markerName = "%s-%s" % (marker, runTimeStamp)
+ markerName = "%s-%s" % (marker, self.timestamp)
syslog.syslog(self.getSystemLogMarker(markerName, "begin", pid=False))
def removeInitConfig(self):
@@ -56,16 +62,20 @@
runTimeStamp = None
try:
timestamp = open(os.path.join(self.environment.getDataDirectory(), "bootprint"))
- runTimeStamp = timestamp.readline().strip()
+ self.timestamp = timestamp.readline().strip()
+ method = timestamp.readline()
+ if method:
+ self.method = method.strip()
timestamp.close()
- theTime = time.gmtime(time.time())
- duration = self.documentWrapper.duration(runTimeStamp, self.documentWrapper.timeToString(theTime))
+ theTime = time.localtime(time.time())
+ duration = self.documentWrapper.duration(self.timestamp, self.documentWrapper.timeToString(theTime))
print "reboot took " + duration
- durationData = self.documentWrapper.durationData(runTimeStamp, self.documentWrapper.timeToString(theTime))
+ print "method: " + self.method
+ durationData = self.documentWrapper.durationData(self.timestamp, self.documentWrapper.timeToString(theTime))
if durationData.seconds > self.rebootTimeLimit*60:
print "Error: reboot took longer that %u minutes" % self.rebootTimeLimit
return False
- log = self.getSystemLog("%s-%s" % (marker, runTimeStamp.strip()), pid=False)
+ log = self.getSystemLog("%s-%s" % (marker, self.timestamp.strip()), pid=False)
rebootCount = 0
for line in log.split('\n'):
if self.systemLogBootMarker in line:
@@ -90,3 +100,9 @@
return True
+ def getMethod(self):
+ return self.method
+ def getTimestamp(self):
+ return self.timestamp
+ def getDuration(self, timestamp):
+ return self.documentWrapper.durationData(self.timestamp, timestamp)
Modified: trunk/v7/tags.py
===================================================================
--- trunk/v7/tags.py 2011-03-11 13:14:36 UTC (rev 808)
+++ trunk/v7/tags.py 2011-03-11 13:16:04 UTC (rev 809)
@@ -174,6 +174,8 @@
certification="certification"
osqa="osqa"
DEBUG="DEBUG"
+ reboot="reboot"
+ panic="panic"
class SystemFunction:
13 years, 2 months
r808 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-03-11 13:14:36 +0000 (Fri, 11 Mar 2011)
New Revision: 808
Modified:
trunk/Makefile
Log:
R17
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-03-10 19:21:48 UTC (rev 807)
+++ trunk/Makefile 2011-03-11 13:14:36 UTC (rev 808)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.3
-V7_RELEASE := 16
+V7_RELEASE := 17
V7_VERSION_RELEASE := $(V7_VERSION)-$(V7_RELEASE)
V7_VERSION_PY := v7/version.py
V7_SVN_MODULE := svn+ssh://svn.fedorahosted.org/svn/v7
13 years, 2 months
r807 - trunk/tests/network
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-03-10 19:21:48 +0000 (Thu, 10 Mar 2011)
New Revision: 807
Modified:
trunk/tests/network/network.py
Log:
680225 - network test should use HTTP for file transfer tests rather than NFS
Modified: trunk/tests/network/network.py
===================================================================
--- trunk/tests/network/network.py 2011-03-10 13:51:55 UTC (rev 806)
+++ trunk/tests/network/network.py 2011-03-10 19:21:48 UTC (rev 807)
@@ -639,7 +639,7 @@
print "Upload took %.2f seconds, %.2f MB/sec" % (stopTime-startTime, size/((stopTime-startTime)*1000000))
#get the requests' IP address as seen by the server
- pattern = re.compile("[0-9]+\.[0-9]+\.[0-9]+\.[0-9]")
+ pattern = re.compile("[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
match = pattern.search(response)
if match:
uploadIPAddress = match.group()
13 years, 2 months
r806 - in tags: . v7-V1-3R16/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-03-10 13:51:55 +0000 (Thu, 10 Mar 2011)
New Revision: 806
Added:
tags/v7-V1-3R16/
tags/v7-V1-3R16/v7/version.py
Log:
tag version
Copied: tags/v7-V1-3R16/v7/version.py (from rev 335, trunk/v7/version.py)
===================================================================
--- tags/v7-V1-3R16/v7/version.py (rev 0)
+++ tags/v7-V1-3R16/v7/version.py 2011-03-10 13:51:55 UTC (rev 806)
@@ -0,0 +1,5 @@
+
+# v7/version.py is automatically-generated - DO NOT EDIT
+version = '1.3'
+release = '16'
+rhel_version = '6'
13 years, 2 months
r805 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-03-10 13:51:14 +0000 (Thu, 10 Mar 2011)
New Revision: 805
Modified:
trunk/v7.spec.in
Log:
changelog
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2011-03-10 00:47:08 UTC (rev 804)
+++ trunk/v7.spec.in 2011-03-10 13:51:14 UTC (rev 805)
@@ -69,6 +69,13 @@
/etc/init.d/v7
%changelog
+* Thu Mar 10 2011 Greg Nichols <gnichols(a)redhat.com>
+
+V7 1.3 R16
+ 579498 - RH cert suite cpuscaling test fails Nehalem-EX procs
+ 680225 - network test should use HTTP for file transfer tests rather than NFS
+
+
* Tue Mar 08 2011 Greg Nichols <gnichols(a)redhat.com>
V7 1.3 R15
@@ -76,12 +83,10 @@
682672 - reboot testing abort on RHEL6.1
681470 - v7 submit fail on ppc64
678984 - can't find tape device on RHEL6.1
- 680225 - network test should use HTTP for file transfer tests rather than NFS
678974 - pccard testing fail on v7-1.3-10
678642 - Error output is missing line breaks
678180 - cpuscaling verify traceback when unable to find cpufreq directories
674375 - v7 certify misses tests where one of serveral devices has passed
- 579498 - RH cert suite cpuscaling test fails Nehalem-EX procs
* Mon Jan 31 2011 Greg Nichols <gnichols(a)redhat.com>
13 years, 2 months
r804 - trunk/tests/network
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-03-10 00:47:08 +0000 (Thu, 10 Mar 2011)
New Revision: 804
Modified:
trunk/tests/network/network.py
Log:
680225 - network test should use HTTP for file transfer tests rather than NFS
Modified: trunk/tests/network/network.py
===================================================================
--- trunk/tests/network/network.py 2011-03-10 00:45:51 UTC (rev 803)
+++ trunk/tests/network/network.py 2011-03-10 00:47:08 UTC (rev 804)
@@ -735,7 +735,7 @@
success = True
if not self.runSubTest(self.tcpTest, "TCP", "tcp latency and bandwidth test via lmbench"):
success = False
- if not self.runSubTest(self.nfsTest, "HTTP", "HTTP file transfer test"):
+ if not self.runSubTest(self.httpTransferTest, "HTTP", "HTTP file transfer test"):
success = False
if not self.runSubTest(self.icmpTest, "ICMP"):
success = False
13 years, 2 months
r803 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-03-10 00:45:51 +0000 (Thu, 10 Mar 2011)
New Revision: 803
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
579498 - RH cert suite cpuscaling test fails Nehalem-EX procs
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2011-03-10 00:43:35 UTC (rev 802)
+++ trunk/tests/cpuscaling/cpuscaling.py 2011-03-10 00:45:51 UTC (rev 803)
@@ -179,13 +179,14 @@
command = Command("cpufreq-selector -c %s -%s %s" % (cpu, switch, value))
command.echo()
except V7CommandException, exception:
- print "Note: command failed: %s" % exception.command
+ print "Note: command failed: %s" % exception
+ command.printErrors()
result = False
if not result:
print "Trying alternate method."
try:
- command = Command("echo \"%s\" > %s/%s" % (value, cpu, setFile))
+ command = Command("echo \"%s\" > %s/%s" % (value, self.cpufreqDirectories[cpu], setFile))
command.echo()
except V7CommandException, exception:
print "Error: command failed:"
13 years, 2 months
r802 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-03-10 00:43:35 +0000 (Thu, 10 Mar 2011)
New Revision: 802
Modified:
trunk/Makefile
Log:
r16
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-03-08 17:06:39 UTC (rev 801)
+++ trunk/Makefile 2011-03-10 00:43:35 UTC (rev 802)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.3
-V7_RELEASE := 15
+V7_RELEASE := 16
V7_VERSION_RELEASE := $(V7_VERSION)-$(V7_RELEASE)
V7_VERSION_PY := v7/version.py
V7_SVN_MODULE := svn+ssh://svn.fedorahosted.org/svn/v7
13 years, 2 months