r1074 - trunk/tests/storage
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-16 15:39:01 +0000 (Fri, 16 Sep 2011)
New Revision: 1074
Modified:
trunk/tests/storage/storage.py
Log:
736638 - v7 storage test won't work on 4K sector storage device
736666 - v7 storage test has an improper write/read sequence
736675 - v7 storage test sets an improper I/O records
736679 - v7 storage test: improper dt options for raw I/O test
Modified: trunk/tests/storage/storage.py
===================================================================
--- trunk/tests/storage/storage.py 2011-09-16 15:08:49 UTC (rev 1073)
+++ trunk/tests/storage/storage.py 2011-09-16 15:39:01 UTC (rev 1074)
@@ -93,11 +93,13 @@
tests[disk] = test
return tests.values()
- def doDt(self, minBs, maxBs, options):
+ def doDt(self, minBs, maxBs, size, options):
"""Helper function: run dt with various block sizes and reasonable defaults."""
bs = minBs
while bs <= maxBs:
- (returnValue,junk) = commands.getstatusoutput("dt enable=aio aios=8 pattern=0xDEADBEEF bs=%s %s" % (bs,options))
+ records = size * 1024 / bs
+ # dt will default enable verify
+ (returnValue,junk) = commands.getstatusoutput("dt pattern=0xDEADBEEF bs=%d records=%d %s" % (bs, records, options))
print junk
print "returns %s" % returnValue
sys.stdout.flush()
@@ -109,31 +111,21 @@
def dtTest(self, minBs, maxBs, file, size, otherOptions):
"""Do a few passes of read/write testing on the given device."""
- # 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)
- seqReaOpt = "if=%s records=%s iotype=sequential %s" % (file, blocks, otherOptions)
+ seq_opt = "of=%s iotype=sequential dispose=keep %s" % (file, otherOptions)
# random passes
# generate a random seed first
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, size, otherOptions)
- ranReaOpt = "if=%s records=%s iotype=random ralign=%s rseed=%s dlimit=%s %s" % (file, blocks, minBs, seed, size, otherOptions)
+ ran_opt = "of=%s iotype=random dispose=keep enable=verify ralign=%s rseed=%s dlimit=%s %s" % (file, minBs, seed, size, otherOptions)
# start
- print "--- sequential write"
+ print "--- sequential write/read"
sys.stdout.flush()
- returnValue1 = self.doDt(minBs, maxBs, seqWriOpt)
- print "--- sequential read"
+ returnValue1 = self.doDt(minBs, maxBs, size, seq_opt)
+ print "--- random write/read"
sys.stdout.flush()
- returnValue2 = self.doDt(minBs, maxBs, seqReaOpt)
- print "--- random write"
- sys.stdout.flush()
- returnValue3 = self.doDt(minBs, maxBs, ranWriOpt)
- print "--- random read"
- sys.stdout.flush()
- returnValue4 = self.doDt(minBs, maxBs, ranReaOpt)
- if returnValue1 and returnValue2 and returnValue3 and returnValue4:
+ returnValue2 = self.doDt(minBs, maxBs, size, ran_opt)
+ if returnValue1 and returnValue2:
returnValue = True
else:
returnValue = False
@@ -154,6 +146,15 @@
sys.stdout.flush()
return size
+ def dev_sector_size(self, testdev):
+ size = 0
+ (status, output) = commands.getstatusoutput("cat /sys/block/%s/queue/hw_sector_size" % testdev)
+ if not status:
+ size = int(output)
+ else:
+ print "Warning: can't get device sector size from /sys/block/%s/queue/hw_sector_size" % testdev
+ return size
+
def deviceIsLvm(self,key,Device):
"""Return true if the given device is actually an LV, and that LV is only on
the device we're trying to test."""
@@ -350,7 +351,7 @@
junkSize = int(junkSize)
if junkSize < self.maxSize:
size = junkSize
- otherOptions = " "
+ otherOptions = " enable=aio aios=8"
if self.dtTest(minBs,maxBs,dtTestFile,size,otherOptions):
if self.unmount(testdev):
print "umount ok"
@@ -462,6 +463,10 @@
else:
minBs = self.defaultMinBs
maxBs = self.defaultMaxBs
+ # Check set min block size to its sector size
+ size_tmp = self.dev_sector_size(testdev)
+ if size_tmp:
+ minBs = size_tmp
# start to torture the disks
returnValue = self.testVFS(storageDevice,testdev,minBs,maxBs)
if returnValue:
12 years, 7 months
r1073 - trunk/tests/bluray
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-16 15:08:49 +0000 (Fri, 16 Sep 2011)
New Revision: 1073
Modified:
trunk/tests/bluray/bluray.py
Log:
737859 - bluray incur traceback: BluRayTest instance has no attribute mediaNames
Modified: trunk/tests/bluray/bluray.py
===================================================================
--- trunk/tests/bluray/bluray.py 2011-09-16 14:48:13 UTC (rev 1072)
+++ trunk/tests/bluray/bluray.py 2011-09-16 15:08:49 UTC (rev 1073)
@@ -59,7 +59,7 @@
if mediaType == mediaInDrive:
print "Media Matched: Media in drive now is %s\n" % self.printMediaName(mediaInDrive)
return True
- elif mediaType == "bd" and (mediaInDrive == "bdrom" or mediaInDrive in self.mediaNames):
+ elif mediaType == "bd" and (mediaInDrive == "bdrom" or mediaInDrive in self.mediaTypes):
print "Required media is %s , media in drive now is %s , test continues ... \n" % (mediaType, self.printMediaName(mediaInDrive))
return True
else:
12 years, 7 months
r1072 - trunk/server/cgi
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-16 14:48:13 +0000 (Fri, 16 Sep 2011)
New Revision: 1072
Modified:
trunk/server/cgi/saved.py
Log:
725441 - FEAT: save command should store results on server for review
Modified: trunk/server/cgi/saved.py
===================================================================
--- trunk/server/cgi/saved.py 2011-09-15 17:37:02 UTC (rev 1071)
+++ trunk/server/cgi/saved.py 2011-09-16 14:48:13 UTC (rev 1072)
@@ -46,9 +46,9 @@
localPath = os.path.join(environment.getServerDirectory(), "store")
resultsFileFilter = re.compile("\.(xml|xml.gz)$", re.IGNORECASE)
fileNamePattern = re.compile("^v7-results-(?P<hostname>.+)-(?P<date>[0-9]+)\.xml(.gz)?$")
- for (root,dirs,files) in os.walk(localPath):
- files = filter(resultsFileFilter.search, files)
+ for (root,dirs,files) in os.walk(localPath):
if files:
+ files = sorted(files)
info = root[len(localPath):]
print " ".join(info.split("/")[1:]) + "<br>"
12 years, 7 months
r1071 - tags
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-15 17:37:02 +0000 (Thu, 15 Sep 2011)
New Revision: 1071
Added:
tags/v7-V1-4R22/
Log:
tag version
12 years, 8 months
r1070 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-15 17:36:42 +0000 (Thu, 15 Sep 2011)
New Revision: 1070
Modified:
trunk/v7.spec.in
Log:
changelog
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2011-09-15 17:36:22 UTC (rev 1069)
+++ trunk/v7.spec.in 2011-09-15 17:36:42 UTC (rev 1070)
@@ -79,7 +79,7 @@
%changelog
* Wed Aug 31 2011 Greg Nichols <gnichols(a)redhat.com>
-V7 1.4 R21
+V7 1.4 R22
732113 - cpuscaling rewrite
737651 - Traceback in v7 cpuscaling test (TypeError: float argument required, not str)
12 years, 8 months
r1069 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-15 17:36:22 +0000 (Thu, 15 Sep 2011)
New Revision: 1069
Modified:
trunk/Makefile
Log:
R22
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-09-15 17:35:41 UTC (rev 1068)
+++ trunk/Makefile 2011-09-15 17:36:22 UTC (rev 1069)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.4
-V7_RELEASE := 21
+V7_RELEASE := 22
V7_VERSION_RELEASE := $(V7_VERSION)-$(V7_RELEASE)
V7_VERSION_PY := v7/version.py
V7_SVN_MODULE := svn+ssh://svn.fedorahosted.org/svn/v7
12 years, 8 months
r1068 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-15 17:35:41 +0000 (Thu, 15 Sep 2011)
New Revision: 1068
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
732113 - cpuscaling rewrite
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2011-09-15 14:23:00 UTC (rev 1067)
+++ trunk/tests/cpuscaling/cpuscaling.py 2011-09-15 17:35:41 UTC (rev 1068)
@@ -162,6 +162,11 @@
def checkFrequency(self, freq1, freq2):
# freq1 and freq2 is strings, in KHz
return abs(int(freq1)-int(freq2)) < self.frequencyTolerance*1000 # MHz->KHz
+
+ def checkFrequencyGreaterThan(self, freq1, freq2):
+ # freq1 and freq2 is strings, in KHz
+ # check if freq1+tolerance >= freq2
+ return int(freq1) + self.frequencyTolerance*1000 > int(freq2)
def checkSpeedup(self, speedup, warn=False):
message = None
@@ -587,13 +592,17 @@
print "\nCPU Flags:"
self.getCPUFlags()
+ self.turboBoostSupport = False
support = " NOT"
if self.idaFlag in self.cpuFlags:
support = ""
+ self.turboBoostSupport = True
print " %s: Turbo Boost is%s supported" % (self.idaFlag, support)
+ self.effectiveFrequencySupport = False
support = " NOT"
if self.aperfmperfFlag in self.cpuFlags:
support = ""
+ self.effectiveFrequencySupport = True
print " %s: aperf/mperf is%s supported"% (self.aperfmperfFlag, support)
sys.stdout.flush()
@@ -610,15 +619,30 @@
print exception
def turboBoostSupported(self):
- # if "ida" turbo thing, increase the expectation by 8%
- if self.cpuFlags and self.idaFlag in self.cpuFlags:
- return True
- #otherwise
- return False
-
- # print "Note: found %s flag, increasing expected speedup by %.1f%%" % (self.idaFlag, self.idaSpeedupFactor)
- # self.predictedSpeedup = self.predictedSpeedup*(1.0/(1.0-(self.idaSpeedupFactor/100.0)))
-
+ return self.turboBoostSupport
+
+ def checkEffectiveFrequency(self, requiredFrequency, unlimitedMaximum=False):
+ """ requiredFrequency: string, in KHz """
+ success = True
+ if self.effectiveFrequencySupport:
+ for cpu in self.packageToCpus[self.currentPackage]:
+ frequencyMHz = self.getWorkloadFreq(self.workloadEffectiveFreq, self.currentWorkload, cpu)
+ if not frequencyMHz:
+ self.logWorkloadError("Error: could not determine the measured frequency for cpu %s under workload %s" % (cpu, self.currentWorkload))
+ success = False
+ continue
+ frequency = frequencyMHz*1000 # KHz
+ if unlimitedMaximum:
+ if not self.checkFrequencyGreaterThan(frequency, requiredFrequency):
+ self.logWorkloadError("Error: cpu%s in package %s has a measured frequency of %u MHz vs. a requirement of %u MHz (- %u MHz tolerance)"
+ % (cpu, self.currentPackage, int(frequency)/1000, int(requiredFrequency)/1000, self.frequencyTolerance))
+ success = False
+ else:
+ if not self.checkFrequency(requiredFrequency, frequency):
+ self.logWorkloadError("Error: cpu%s in package %s has a measured frequency of %u MHz vs. a requirement of %u MHz +- %u MHz"
+ % (cpu, self.currentPackage, int(frequency)/1000, int(requiredFrequency)/1000, self.frequencyTolerance))
+ success = False
+ return success
def runUserSpaceTests(self):
print ""
@@ -649,10 +673,15 @@
sys.stdout.flush()
# 8. Verify the speed is set to the lowest value by comparing ~/scaling_min_freq to ~/scaling_cur_freq
+ # This is an error if EFI is not supported, a warning otherwise
currentFrequency = self.getFrequency()
minimumFrequency = self.getPackageParameter("scaling_min_freq")
if not minimumFrequency or not currentFrequency or not self.checkFrequency(minimumFrequency, currentFrequency):
- self.logWorkloadError("Error: Could not verify that cpu frequency is set to the minimum value of %s" % minimumFrequency)
+ message = "Could not verify that cpu frequency is set to the minimum value of %s" % minimumFrequency
+ if self.effectiveFrequencySupport:
+ print "Warning: %s" % message
+ else:
+ self.logWorkloadError("Error: %s" % message)
success = False
# 9. Run and time non-cacheable work(?) test for each CPU
@@ -663,6 +692,10 @@
return False
print "Minumum frequency average load test time: %.2f" % self.minimumFrequencyTestTime
+ # 10.5 if EFI is supported, check the measured EFI freq is near the minimum freq
+ if not self.checkEffectiveFrequency(minimumFrequency):
+ success = False
+
# 11. Set the cpu speed to it's highest value as above.
frequency = self.frequencies[-1]
currentFrequency = self.getFrequency(ignoreErrors=True)
@@ -681,8 +714,12 @@
return False
if not maximumFrequency or not currentFrequency or not self.checkFrequency(maximumFrequency, currentFrequency):
- self.logWorkloadError("Error: Could not verify that cpu frequency is set to the maximum value of %s" % maximumFrequency)
- success = False
+ message = "Could not verify that cpu frequency is set to the maximum value of %s" % maximumFrequency
+ if self.effectiveFrequencySupport:
+ print ("Warning: %s" % message)
+ else:
+ self.logWorkloadError("Error: %s" % message)
+ success = False
# 12. Repeat workload test, record timing
self.maximumFrequencyTestTime = self.runLoadTest()
@@ -690,6 +727,10 @@
return False
print "Maximum frequency average load test time: %.2f" % self.maximumFrequencyTestTime
+ # 12.5 under EFI, check the max measured freqency is >= stated max
+ if not self.checkEffectiveFrequency(maximumFrequency, unlimitedMaximum=True):
+ success = False
+
# 13. Verify MHz increase is comparable to time % decrease( eg. slow MHz/fast MHz ~= fast time/slow time;
# again with self.speedUpTolerance margin)
@@ -776,16 +817,26 @@
if not maximumFrequency or not currentFrequency:
self.logWorkloadError("Error: could not determine current frequency")
return False
- elif not self.checkFrequency(maximumFrequency, currentFrequency):
- self.logWorkloadError("Error: Current cpu frequency of %s is not set to the maximum value of %s" % (currentFrequency, maximumFrequency))
- return False
+ # otherwise
+ if not self.checkFrequency(maximumFrequency, currentFrequency):
+ message = "Current cpu frequency of %s is not set to the maximum value of %s" % (currentFrequency, maximumFrequency)
+ if self.effectiveFrequencySupport:
+ print "Warning: %s" % message
+ else:
+ self.logWorkloadError("Error: %s " % message)
+ success = False
+
# 22. Repeat workload test, record timing, also verify frequency does not drop during run
self.performanceTestTime = self.runLoadTest()
if not self.performanceTestTime:
return False
# otherwise
print "Performance load test time: %.2f" % self.performanceTestTime
+
+ # 22.5 check EFI freq vs. max
+ if not self.checkEffectiveFrequency(maximumFrequency, unlimitedMaximum=True):
+ success = False
# 23. Compare the timing to the max results for a self.speedUpTolerance delta
for cpu in self.packageToCpus[self.currentPackage]:
@@ -881,10 +932,12 @@
if self.debug != Constants.off:
self.dumpTables()
- self.printFreqSummary("CPU Frequency Test", package, self.workloadFreq)
- self.printFreqSummary("CPU Effective Frequency", package, self.workloadEffectiveFreq)
-
+ if self.effectiveFrequencySupport:
+ self.printFreqSummary("CPU Effective Frequency", package, self.workloadEffectiveFreq)
+ else:
+ self.printFreqSummary("CPU Frequency Test (No Effective Frequency Support)", package, self.workloadFreq)
+
if "ondemand" in self.workloadTime:
print "\nCPU Workload Test:\n"
print "Expected Speedup: %.2f" % self.predictedSpeedup
@@ -904,6 +957,7 @@
print ""
print ""
+
def printFreqSummary(self, title, package, freqTable):
print ""
print "Summary for Package %s:" % package
12 years, 8 months
r1067 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-15 14:23:00 +0000 (Thu, 15 Sep 2011)
New Revision: 1067
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
732113 - cpuscaling rewrite
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2011-09-14 13:57:18 UTC (rev 1066)
+++ trunk/tests/cpuscaling/cpuscaling.py 2011-09-15 14:23:00 UTC (rev 1067)
@@ -464,11 +464,13 @@
return None
# otherwise - collect info
print "process for cpu %s is done in %.2f seconds, at %u MHz" % (cpu, runTime, int(int(frequency)/1000))
+ self.setWorkloadTime(self.currentWorkload, cpu, runTime)
+ self.setWorkloadFreq(self.currentWorkload, cpu, frequency)
if effectiveFrequency:
print "process effective frequency: %u MHz" % (effectiveFrequency/1000)
- self.setWorkloadTime(self.currentWorkload, cpu, runTime)
- self.setWorkloadFreq(self.currentWorkload, cpu, frequency)
- self.setWorkloadEffectiveFreq(self.currentWorkload, cpu, effectiveFrequency)
+ self.setWorkloadEffectiveFreq(self.currentWorkload, cpu, effectiveFrequency)
+ else:
+ print "Warning: could not determine effective frequency"
totalProcessTime += runTime
del self.loadProcesses[cpu]
@@ -919,8 +921,10 @@
sys.stdout.write("cpu %-3s " % cpu)
for workload in self.workloads:
if workload in self.workloadTime and workload != "ondemand" and workload != "turbo":
- sys.stdout.write(" %4u" % self.getWorkloadFreq(freqTable, workload, cpu))
- sys.stdout.write((" (%.2fs) " % self.getWorkloadTime(workload, cpu))[:10])
+ freq = self.getWorkloadFreq(freqTable, workload, cpu)
+ if freq:
+ sys.stdout.write(" %4u" % freq)
+ sys.stdout.write((" (%.2fs) " % self.getWorkloadTime(workload, cpu))[:10])
print ""
print ""
12 years, 8 months
r1066 - tags
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-14 13:57:18 +0000 (Wed, 14 Sep 2011)
New Revision: 1066
Added:
tags/v7-V1-4R21/
Log:
tag version
12 years, 8 months
r1065 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-09-14 13:56:13 +0000 (Wed, 14 Sep 2011)
New Revision: 1065
Modified:
trunk/v7.spec.in
Log:
changelog
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2011-09-14 13:55:50 UTC (rev 1064)
+++ trunk/v7.spec.in 2011-09-14 13:56:13 UTC (rev 1065)
@@ -79,9 +79,10 @@
%changelog
* Wed Aug 31 2011 Greg Nichols <gnichols(a)redhat.com>
-V7 1.4 R20
+V7 1.4 R21
732113 - cpuscaling rewrite
+ 737651 - Traceback in v7 cpuscaling test (TypeError: float argument required, not str)
* Mon Aug 22 2011 Greg Nichols <gnichols(a)redhat.com>
12 years, 8 months