r622 - trunk/tests/reboot
by gnichols@fedoraproject.org
Author: gnichols
Date: 2010-08-06 01:32:17 +0000 (Fri, 06 Aug 2010)
New Revision: 622
Modified:
trunk/tests/reboot/reboot.py
Log:
621056 - v7 failed after reboot test
Modified: trunk/tests/reboot/reboot.py
===================================================================
--- trunk/tests/reboot/reboot.py 2010-08-06 01:31:40 UTC (rev 621)
+++ trunk/tests/reboot/reboot.py 2010-08-06 01:32:17 UTC (rev 622)
@@ -39,6 +39,7 @@
def verifyKDump(self):
# if kdump is set up, use it
print "Checking kdump configuration"
+ verified = True
# these checks aren't required, leaving them for diagnostic purposes
kernelBootParams = Command("cat /proc/cmdline")
@@ -49,16 +50,24 @@
print "Found crashkernel=%s boot parameter" % kdump
except:
print "Warning: \"crashkernel\" is not set in boot parameters"
+ verified = False
try:
- panicRebootTimeout = Command("cat /proc/sys/kernel/panic")
- timeout = panicRebootTimeout.getInteger()
- if timeout > 0:
- print "Kernel panic reboot timeout is %u" % timeout
- else:
- print "Warning: Panic reboot is disabled (/proc/sys/kernel/panic is set to 0)"
+ procPanicTimeout = "/proc/sys/kernel/panic"
+ getPanic = Command("cat " + procPanicTimeout)
+ timeout = getPanic.getInteger()
+ print "Kernel panic reboot timeout is %u" % timeout
+ if timeout is 0:
+ print "Setting to 1 sec."
+ setPanic = Command("echo 1 > " + procPanicTimeout)
+ setPanic.echo()
+ if getPanic.getInteger() is not 1:
+ print "Error: could not set panic timeout"
+ verifited = False
except V7CommandException, e:
- print "Warning: could not read /proc/sys/kernel/panic"
+ print "Warning: could not set " + procPanicTimeout
+ print e
+ verified = False
print "Checking kdump service"
try:
@@ -66,11 +75,11 @@
kdump.getString("is operational")
print "kdump is running"
except V7CommandException, e:
- print "kdump is not running - can not test it"
+ print "Warning: kdump is not running - can not test it"
print e
- return False
+ verified = False
- return True
+ return verified
def reboot(self):
@@ -78,6 +87,11 @@
if self.getMode() != Constants.auto:
if not self.promptConfirm("Ready to restart?"):
return False
+
+ # we need a delay here to give v7 time to finish writing results.xml
+ sys.stdout.flush()
+ self.waitForLull()
+
rebootCommand = Command("shutdown -r 0")
try:
rebootCommand.echo()
@@ -98,6 +112,10 @@
if self.getMode() != Constants.auto:
if not self.promptConfirm("Ready to restart?"):
return False
+ # we need a delay here to give v7 time to finish writing results.xml
+ sys.stdout.flush()
+ self.waitForLull()
+
try:
Command("echo 1 > /proc/sys/kernel/sysrq").echo()
Command("echo \"c\" > /proc/sysrq-trigger").echo()
13 years, 9 months
r621 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2010-08-06 01:31:40 +0000 (Fri, 06 Aug 2010)
New Revision: 621
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
621614 - systems with no cpuscaling show errors about cpufreq directories
621056 - v7 failed after reboot test
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2010-08-03 16:01:23 UTC (rev 620)
+++ trunk/tests/cpuscaling/cpuscaling.py 2010-08-06 01:31:40 UTC (rev 621)
@@ -90,15 +90,16 @@
return None
# look for cpu subdirectories
pattern = re.compile("cpu(?P<cpuNumber>[0-9]+)")
- self.cpufreqDirectories = list()
+ self.cpufreqDirectories = None
for subdirectory in os.listdir(self.sysCPUDirectory):
match = pattern.search(subdirectory)
if match and match.group("cpuNumber"):
cpufreqDirectory = "%s/%s/cpufreq" % (self.sysCPUDirectory, subdirectory)
if not os.path.exists(cpufreqDirectory):
- print "Error: cpu %s has no cpufreq directory %s" % (match.group("cpuNumber"), cpufreqDirectory)
- return None
+ continue
# otherwise
+ if not self.cpufreqDirectories:
+ self.cpufreqDirectories = list()
self.cpufreqDirectories.append(cpufreqDirectory)
if len(self.cpufreqDirectories) is 0:
return None
@@ -334,37 +335,6 @@
except V7CommandException, exception:
print "Warning: could not read CPU flags"
print exception
-
- def getLoadAvg(self):
- loadAvgFile = "/proc/loadavg"
- if os.path.exists(loadAvgFile):
- file = open(loadAvgFile)
- line = file.readline()
- if len(line.strip()) > 0:
- params = line.strip().split()
- loadAvg = float(params[0])
- print "Current load average: %s" % loadAvg
- sys.stdout.flush
- return loadAvg
- else:
- return 0
-
-
- def syncDisks(self):
- command = Command("/bin/sync")
- command.echo()
-
-
- def waitForLull(self):
- waitTime = 5
- retryLimit = 20
-
- self.syncDisks()
-
- retryCount = 0
- while self.getLoadAvg() > 1 and retryCount < retryLimit:
- time.sleep(waitTime)
- retryCount = retryCount + 1
def runUserSpaceTests(self):
13 years, 9 months
r620 - trunk/tests/storage
by gnichols@fedoraproject.org
Author: gnichols
Date: 2010-08-03 16:01:23 +0000 (Tue, 03 Aug 2010)
New Revision: 620
Modified:
trunk/tests/storage/storage.py
Log:
606963 - Storage test fail on RH6 certification
Modified: trunk/tests/storage/storage.py
===================================================================
--- trunk/tests/storage/storage.py 2010-08-03 16:00:37 UTC (rev 619)
+++ trunk/tests/storage/storage.py 2010-08-03 16:01:23 UTC (rev 620)
@@ -104,13 +104,8 @@
bs = bs * 2
return True
- def dtTest(self, minBs, maxBs, file, devSize, otherOptions):
+ def dtTest(self, minBs, maxBs, file, size, otherOptions):
"""Do a few passes of read/write testing on the given device."""
- # Restrict size to self.maxSize
- maxSizeTmp = self.maxSize
- size = string._int(devSize)
- if size > maxSizeTmp:
- size = maxSizeTmp
# Find out how many maxBs-sized blocks we can fit on the test file/dev
blocks = ((size/(maxBs/1024)))
seqWriOpt = "of=%s records=%s iotype=sequential dispose=keep disable=verify %s" % (file, blocks, otherOptions)
@@ -120,8 +115,8 @@
seed = random.randint(0,32767)
if "direct" in otherOptions:
otherOptions = otherOptions + " rlimit=%s" % (size * 1024)
- ranWriOpt = "of=%s records=%s iotype=random dispose=keep disable=verify ralign=%s rseed=%s dlimit=%s %s" % (file, blocks, minBs, seed, maxSizeTmp, otherOptions)
- ranReaOpt = "if=%s records=%s iotype=random ralign=%s rseed=%s dlimit=%s %s" % (file, blocks, minBs, seed, maxSizeTmp, otherOptions)
+ ranWriOpt = "of=%s records=%s iotype=random dispose=keep disable=verify ralign=%s rseed=%s dlimit=%s %s" % (file, blocks, minBs, seed, size, otherOptions)
+ ranReaOpt = "if=%s records=%s iotype=random ralign=%s rseed=%s dlimit=%s %s" % (file, blocks, minBs, seed, size, otherOptions)
# start
print "--- sequential write"
sys.stdout.flush()
@@ -142,20 +137,13 @@
return returnValue
def devSize(self,testdevice):
- """Find the size of the given device.
- We use 'file' to find the major/minor numbers for the device, then sed
- to change "/dev/hda1: block special (3/1)" into '3 1'
- where '3' is the major number and '1' is the minor number"""
- # set the default size to 1024
- size = 1024
- deviceFile = "/dev/" + testdevice
- (status,output) = commands.getstatusoutput("file -L %s |sed -r 's|.*special .([0-9]+)/([0-9]+).|\\1 \\2|' " % deviceFile)
- majorMinor = output.split()
- if status == 0:
- majorNum = majorMinor[0]
- minorNum = majorMinor[1]
- (status,output) = commands.getstatusoutput("grep '^ *%s *%s ' /proc/partitions | awk '{print $3}'" % (majorNum,minorNum))
- size = output
+ # Use 1GB or the device size whichever is smaller.
+ size = self.maxSize
+ (status,output) = commands.getstatusoutput("cat /sys/block/%s/size" % testdevice)
+ # Why is the /sys size value 2x what /proc shows?
+ output = int(output) / 2
+ if status == 0 and output < self.maxSize:
+ size = output
else:
print "Warning ! can not get device number. "
sys.stdout.flush()
@@ -342,7 +330,10 @@
return False
(success,junkSize) = commands.getstatusoutput("df -Pk %s | awk '{print $4}' | tail -n1" % mountdir)
if success == 0:
- size = junkSize
+ size = self.maxSize
+ junkSize = int(junkSize)
+ if junkSize < self.maxSize:
+ size = junkSize
otherOptions = " "
if self.dtTest(minBs,maxBs,dtTestFile,size,otherOptions):
if self.unmount(testdev):
13 years, 9 months
r619 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2010-08-03 16:00:37 +0000 (Tue, 03 Aug 2010)
New Revision: 619
Modified:
trunk/Makefile
Log:
R15
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-07-30 16:04:28 UTC (rev 618)
+++ trunk/Makefile 2010-08-03 16:00:37 UTC (rev 619)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.2
-V7_RELEASE := 14
+V7_RELEASE := 15
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, 9 months