r1249 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2012-03-29 00:20:29 +0000 (Thu, 29 Mar 2012)
New Revision: 1249
Modified:
trunk/v7.spec.in
Log:
changlog
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2012-03-29 00:19:55 UTC (rev 1248)
+++ trunk/v7.spec.in 2012-03-29 00:20:29 UTC (rev 1249)
@@ -81,6 +81,12 @@
%changelog
+* Wed Mar 28 2012 Greg Nichols <gnichols(a)redhat.com>
+
+V7 1.5 R13
+
+ 807714 - v7 1.5 R12 requires udisks package not in RHEL5
+
* Tue Mar 27 2012 Greg Nichols <gnichols(a)redhat.com>
V7 1.5 R12
12 years, 1 month
r1248 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2012-03-29 00:19:55 +0000 (Thu, 29 Mar 2012)
New Revision: 1248
Modified:
trunk/v7/udisksDeviceDetector.py
Log:
changlog
Modified: trunk/v7/udisksDeviceDetector.py
===================================================================
--- trunk/v7/udisksDeviceDetector.py 2012-03-29 00:16:07 UTC (rev 1247)
+++ trunk/v7/udisksDeviceDetector.py 2012-03-29 00:19:55 UTC (rev 1248)
@@ -46,23 +46,26 @@
def getDevices(self):
devices = list()
- for devicePath in self.interface.EnumerateDevices():
- device = self.bus.get_object(self.rootObject, devicePath)
- deviceProperties = dbus.Interface(device, dbus.PROPERTIES_IFACE)
- #try:
- if True:
- if deviceProperties.Get("org.freedesktop.UDisks.Device", "DeviceIsDrive"):
- devices.append(UDisksDrive(device))
- elif deviceProperties.Get("org.freedesktop.UDisks.Device", "DeviceIsPartition"):
- devices.append(UDisksPartition(device))
- else:
- devices.append(UDisksDevice(device))
- #except Exception, e:
- #print e
-
- for adapterPath in self.interface.EnumerateAdapters():
- adapter = self.bus.get_object(self.rootObject, adapterPath)
- devices.append(UDisksAdapter(adapter))
+ try:
+ for devicePath in self.interface.EnumerateDevices():
+ device = self.bus.get_object(self.rootObject, devicePath)
+ deviceProperties = dbus.Interface(device, dbus.PROPERTIES_IFACE)
+ if True:
+ if deviceProperties.Get("org.freedesktop.UDisks.Device", "DeviceIsDrive"):
+ devices.append(UDisksDrive(device))
+ elif deviceProperties.Get("org.freedesktop.UDisks.Device", "DeviceIsPartition"):
+ devices.append(UDisksPartition(device))
+ else:
+ devices.append(UDisksDevice(device))
+
+ for adapterPath in self.interface.EnumerateAdapters():
+ adapter = self.bus.get_object(self.rootObject, adapterPath)
+ devices.append(UDisksAdapter(adapter))
+
+ except dbus.DBusException, e:
+ if self.debugging:
+ print "Could not get devices from UDisks:"
+ print e
return devices
12 years, 1 month
r1247 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2012-03-29 00:16:07 +0000 (Thu, 29 Mar 2012)
New Revision: 1247
Added:
trunk/v7spec.py
Modified:
trunk/Makefile
trunk/v7.spec.in
Log:
807714 - v7 1.5 R12 requires udisks package not in RHEL5
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2012-03-28 13:44:54 UTC (rev 1246)
+++ trunk/Makefile 2012-03-29 00:16:07 UTC (rev 1247)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.5
-V7_RELEASE := 12
+V7_RELEASE := 13
V7_VERSION_RELEASE := $(V7_VERSION)-$(V7_RELEASE)
V7_VERSION_PY := v7/version.py
V7_SVN_MODULE := svn+ssh://svn.fedorahosted.org/svn/v7
@@ -72,7 +72,7 @@
tar cjS -f $@ -X /tmp/v7/exclude --exclude $@ Makefile server
-/tmp/v7/exclude:
+/tmp/v7/exclude: Makefile
mkdir -p /tmp/v7
echo "CVS" > $@
echo "save" >> $@
@@ -81,9 +81,10 @@
echo "v7/*.pyc" >> $@
echo "test-env/bin/*.pyc" >> $@
echo "*.bz2" >> $@
+ echo "v7spec.*" >> $@
-v7.spec: v7.spec.in Makefile
- cat $< | sed -e 's/@V7_VERSION@/$(V7_VERSION)/g' -e 's/@V7_RELEASE@/$(V7_RELEASE)/g' -e 's/@V7_RHEL_VERSION@/$(V7_RHEL_VERSION)/g'> $@
+v7.spec: v7.spec.in v7spec.py v7/version.py
+ ./v7spec.py --rhelVersion $(V7_RHEL_VERSION)
v7-server.spec: v7-server.spec.in Makefile
cat $< | sed -e 's/@V7_VERSION@/$(V7_VERSION)/g' -e 's/@V7_RELEASE@/$(V7_RELEASE)/g' -e 's/@V7_RHEL_VERSION@/$(V7_RHEL_VERSION)/g'> $@
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2012-03-28 13:44:54 UTC (rev 1246)
+++ trunk/v7.spec.in 2012-03-29 00:16:07 UTC (rev 1247)
@@ -24,8 +24,9 @@
Obsoletes: hts
Requires: lmbench, dt, httpd, nfs-utils, stress, gcc, PyXML, rpm-build
Requires: dbus-python, kernel-devel, kernel-headers, sos
-# RHEL6
+# RHEL6-only-begin
Requires: udisks
+# RHEL6-only-end
# v7-server subpackage
%package server
Added: trunk/v7spec.py
===================================================================
--- trunk/v7spec.py (rev 0)
+++ trunk/v7spec.py 2012-03-29 00:16:07 UTC (rev 1247)
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+""" generate the v7.spec file via macro substitution """
+
+from optparse import OptionParser
+import v7.version
+
+def doMacro(line, macro, value):
+ if macro not in line:
+ return line
+
+ # otherwise
+ parts = line.split(macro)
+ return "%s%s%s" % (parts[0], value, parts[1])
+
+usage = "usage: %prog [options]"
+
+parser = OptionParser(usage)
+
+parser.add_option("-v", "--rhelVersion",
+ action="store", dest="rhelVersion", type="int", default=6,
+ help="RHEL Major Version")
+
+(options,args) = parser.parse_args()
+
+
+inputSpec = open("v7.spec.in")
+outputSpec = open("v7.spec", "w")
+skipping = False
+for line in inputSpec.readlines():
+
+ if options.rhelVersion is not 6 and "# RHEL6-only-begin\n" == line:
+ skipping = True
+ continue
+ elif skipping and options.rhelVersion is not 6 and "# RHEL6-only-end\n" == line:
+ skipping = False
+ continue
+ elif skipping:
+ continue
+ macros = {"@V7_VERSION@": v7.version.version, "@V7_RELEASE@": v7.version.release, "@V7_RHEL_VERSION@": options.rhelVersion }
+ for (macro, value) in macros.items():
+ line = doMacro(line, macro, value)
+ outputSpec.write(line)
+
\ No newline at end of file
Property changes on: trunk/v7spec.py
___________________________________________________________________
Added: svn:executable
+ *
12 years, 1 month
r1246 - tags
by gnichols@fedoraproject.org
Author: gnichols
Date: 2012-03-28 13:44:54 +0000 (Wed, 28 Mar 2012)
New Revision: 1246
Added:
tags/v7-V1-5R12/
Log:
tag version
12 years, 1 month
r1245 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2012-03-28 13:44:05 +0000 (Wed, 28 Mar 2012)
New Revision: 1245
Modified:
trunk/Makefile
Log:
R12
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2012-03-27 20:29:24 UTC (rev 1244)
+++ trunk/Makefile 2012-03-28 13:44:05 UTC (rev 1245)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.5
-V7_RELEASE := 11
+V7_RELEASE := 12
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, 1 month
r1244 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2012-03-27 20:29:24 +0000 (Tue, 27 Mar 2012)
New Revision: 1244
Modified:
trunk/v7.spec.in
Log:
805757 - info test missing requires for sos (sosreport)
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2012-03-27 19:47:25 UTC (rev 1243)
+++ trunk/v7.spec.in 2012-03-27 20:29:24 UTC (rev 1244)
@@ -23,7 +23,7 @@
Conflicts: rhr-core, rhr-auto, rhr-interact, rhr-crush
Obsoletes: hts
Requires: lmbench, dt, httpd, nfs-utils, stress, gcc, PyXML, rpm-build
-Requires: dbus-python, kernel-devel, kernel-headers
+Requires: dbus-python, kernel-devel, kernel-headers, sos
# RHEL6
Requires: udisks
@@ -80,6 +80,14 @@
%changelog
+* Tue Mar 27 2012 Greg Nichols <gnichols(a)redhat.com>
+
+V7 1.5 R12
+
+ 805757 - info test missing requires for sos (sosreport)
+ 781243 - v7 info fails to capture modules tainted for multiple signs
+ 784419 - FEAT: v7 should not error on DUP graylist symbols
+
* Fri Mar 23 2012 Greg Nichols <gnichols(a)redhat.com>
V7 1.5 R11
12 years, 1 month
r1243 - trunk/tests/info
by gnichols@fedoraproject.org
Author: gnichols
Date: 2012-03-27 19:47:25 +0000 (Tue, 27 Mar 2012)
New Revision: 1243
Modified:
trunk/tests/info/info.py
Log:
781243 - v7 info fails to capture modules tainted for multiple signs\n 784419 - FEAT: v7 should not error on DUP graylist symbols
Modified: trunk/tests/info/info.py
===================================================================
--- trunk/tests/info/info.py 2012-03-23 14:53:39 UTC (rev 1242)
+++ trunk/tests/info/info.py 2012-03-27 19:47:25 UTC (rev 1243)
@@ -78,7 +78,7 @@
success = False
if tainted & Constants.TAINT_TECHPREVIEW_MODULE:
- modules = Command("cat /proc/modules").getStringList(regex = "^(?P<mod_name>\w+)[\s\S]+\(T\)", regexGroup = "mod_name")
+ modules = self.getTaintedModules("T")
badModules = list()
for module in modules:
if not module in self.techPreviewModuleWhitelist:
@@ -90,7 +90,7 @@
print module
if tainted & Constants.TAINT_UNSIGNED_MODULE:
- modules = Command("cat /proc/modules").getStringList(regex = "^[\s\S]+\(U\)")
+ modules = self.getTaintedModules("U")
print "Unsigned modules:"
for module in modules:
print module
@@ -124,6 +124,19 @@
return success
+ def getTaintedModules(self, sign):
+ pattern = re.compile("^(?P<mod_name>\w+)[\s\S]+\((?P<signs>[A-Z]+)\)")
+ procModules = open("/proc/modules")
+ modules = list()
+ for line in procModules.readlines():
+ match = pattern.match(line)
+ if match:
+ if sign in match.group("signs"):
+ modules.append(match.group("mod_name"))
+ procModules.close()
+ return modules
+
+
def checkKernelIsGA(self):
if "Red Hat"not in self.redHatRelease.getProduct() or self.redHatRelease.getVersion() < 5:
@@ -441,10 +454,26 @@
if not moduleSymbols:
return False
extraSymbols = self.abiCheckSymbols(whitelistSymbols, moduleSymbols)
+
+ # check for a DUP greylist
+ if extraSymbols != []:
+ greylist = "/usr/share/doc/kmod-%s/greylist.txt" % module
+ if os.path.exists(greylist):
+ print "checking greylist for %s" % module
+ greylistSymbols = self.readABIWhitelist(greylist)
+ extraSymbols = self.abiCheckSymbols(greylistSymbols, extraSymbols)
+
+ elif self.debug != Constants.off:
+ print "%s has no greylist %s" % (module, greylist)
if extraSymbols != []:
- print "Error: The following symbols are used by %s are not on the ABI whitelist." % module
+ message = "Error: The following symbols are used by %s are not on the ABI whitelist" % module
+ if os.path.exists(greylist):
+ message += " or DUP greylist."
+ else:
+ message += "."
+ print message
print ""
for symbol in extraSymbols:
print symbol
12 years, 1 month
r1242 - tags
by gnichols@fedoraproject.org
Author: gnichols
Date: 2012-03-23 14:53:39 +0000 (Fri, 23 Mar 2012)
New Revision: 1242
Added:
tags/v7-V1-5R11/
Log:
tag version
12 years, 1 month
r1241 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2012-03-23 14:53:20 +0000 (Fri, 23 Mar 2012)
New Revision: 1241
Modified:
trunk/v7.spec.in
Log:
changelog
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2012-03-23 14:52:31 UTC (rev 1240)
+++ trunk/v7.spec.in 2012-03-23 14:53:20 UTC (rev 1241)
@@ -80,9 +80,9 @@
%changelog
-* Thu Mar 22 2012 Greg Nichols <gnichols(a)redhat.com>
+* Fri Mar 23 2012 Greg Nichols <gnichols(a)redhat.com>
-V7 1.5 R10
+V7 1.5 R11
782189 - FEAT: v7 should be able to upload a result directly to a hwcert.
804492 - V7 should not pass the debug kernel in info when used for hardware tests.
12 years, 1 month
r1240 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2012-03-23 14:52:31 +0000 (Fri, 23 Mar 2012)
New Revision: 1240
Modified:
trunk/v7/catalog.py
trunk/v7/hardwaretest.py
Log:
782189 - FEAT: v7 should be able to upload a result directly to a hwcert.
Modified: trunk/v7/catalog.py
===================================================================
--- trunk/v7/catalog.py 2012-03-23 14:51:53 UTC (rev 1239)
+++ trunk/v7/catalog.py 2012-03-23 14:52:31 UTC (rev 1240)
@@ -24,12 +24,13 @@
from v7.controller import Controller
from v7.environment import Environment
from v7.tags import Tags, Constants
+from v7.certificationtest import CertificationDocument
class Catalog(Controller):
- def __init__(self):
+ def __init__(self, environment):
Controller.__init__(self)
- self.environment = Environment()
+ self.environment = environment
self.login = None
self.password = None
@@ -48,42 +49,71 @@
return False
return True
- def submit(self, certificationDocument):
+ def getCertificationID(self, resultsDocument):
+ if not self.isReachable():
+ print "Could not reach the Red Hat Hardware Catalog %s" % self.getCatalogServer()
+ answer = "existing"
+ else:
+ # otherwise
+ while True:
+ answers = ["new", "existing", "none"]
+ answer = self.ui.prompt("What certification is this system being tested for?", answers)
+ # let them type the ID right away
+ try:
+ int(answer)
+ resultsDocument.setCertificationID(answer)
+ return True
+ except ValueError:
+ pass
+
+ if answer not in answers:
+ print "Please enter one of the following: %s" % "".join(answers)
+ else:
+ break
+ if answer == "new":
+ return self.openCertification(resultsDocument)
+ if answer == "existing":
+ while True:
+ id = self.ui.prompt("Please enter the certification ID:")
+ try:
+ if id != "":
+ int(id)
+ resultsDocument.setCertificationID(id)
+ return True
+ except ValueError:
+ print "%s is not a valid ID, it must be an integer. Enter 0 if ID is unknown"
+ # otherwise
+ return False
+
+
+ def submit(self, resultsDocument):
+
if not self.ui.promptConfirm("\nWould you like to submit the results to the hardware catalog?"):
- return None
+ return True
- if certificationDocument.getCertificationID() <= 0:
- while True:
- id = self.ui.prompt("Please enter the certification ID (ID|new)")
- if id == "new":
- self.openCertification(certificationDocument)
- break
- else:
- try:
- int(id) # make sure it's an integer
- certificationDocument.setCertificationID(id)
- break
- except ValueError:
- print "%s is not a valid ID, it must be an integer"
-
+ if resultsDocument.getCertificationID() <= 0:
+ self.getCertificationID(resultsDocument)
+
# opening the cert may have worked, or we had the certification number already.
- if certificationDocument.getCertificationID() > 0:
- self.submitResults(certificationDocument)
+ if resultsDocument.getCertificationID() > 0:
+ return self.submitResults(resultsDocument)
- def openCertification(self, certificationDocument):
+ return False
+ def openCertification(self, resultsDocument):
+
tags = [Tags.make, Tags.model, Tags.vendor, Tags.category, Tags.product_url, Tags.arch]
hardware = dict()
for tag in tags:
- hardware[tag] = certificationDocument.getHardware(tag)
+ hardware[tag] = resultsDocument.getHardware(tag)
# catalog expects i386 for 32-bit x86
if hardware[Tags.arch] == Constants.i686:
hardware[Tags.arch] = Constants.i386
# get the major RHEL version
- rhelVersion = certificationDocument.getOS(Tags.release).split(".")[0]
+ rhelVersion = resultsDocument.getOS(Tags.release).split(".")[0]
self.login = self.ui.prompt("Red Hat Catalog User Name: ")
self.password = self.ui.promptPassword("Password: ")
@@ -114,14 +144,14 @@
print e
return None
- certificationDocument.setCertificationID(response["id"])
+ resultsDocument.setCertificationID(response["id"])
return response["id"]
- def submitResults(self, certificationDocument):
+ def submitResults(self, resultsDocument):
- if certificationDocument.getCertificationID() <= 0:
- print "Error: The certification ID: %s is not valid." % certificationDocument.getCertificationID()
+ if resultsDocument.getCertificationID() <= 0:
+ print "Error: The certification ID: %s is not valid." % resultsDocument.getCertificationID()
return False
if not self.login or not self.password:
@@ -129,28 +159,34 @@
self.password = self.ui.promptPassword("Password: ")
file = "results.xml"
- certificationDocument.compressToFile(file)
+ resultsDocument.compressToFile(file)
certificationData = open(file + ".gz", "rb").read().encode("base64")
serverProxy = xmlrpclib.ServerProxy(self.environment.getCatalogURL())
try:
params = {"login":self.login,
"password":self.password,
- "certid":certificationDocument.getCertificationID(),
- "filename":certificationDocument.getVerboseFileName(),
+ "certid":resultsDocument.getCertificationID(),
+ "filename":resultsDocument.getVerboseFileName(),
"desc":"test results",
"data":certificationData}
response = serverProxy.Cert.attachResult(params)
print "results uploaded."
+ # copy over to certification.xml to save the certification ID
+ certificationDocument = CertificationDocument()
+ certificationDocument.copy(resultsDocument)
+ certificationDocument.save(self.environment.getCertificationPath())
+ return True
+
except xmlrpclib.Fault, error:
print "Error: could not submit certification results:"
print " Fault code: %s" % error.faultCode
print " Fault string: %s" % error.faultString
- return None
+ return False
except Exception, e:
print "Error: could not submit certification results:"
print e
- return None
+ return False
\ No newline at end of file
Modified: trunk/v7/hardwaretest.py
===================================================================
--- trunk/v7/hardwaretest.py 2012-03-23 14:51:53 UTC (rev 1239)
+++ trunk/v7/hardwaretest.py 2012-03-23 14:52:31 UTC (rev 1240)
@@ -65,6 +65,7 @@
self.command = None
self.virtualization = None
self.redHatRelease = RedHatRelease()
+ self.catalog = Catalog(self.environment)
self.commands = {'plan': self.doPlan,
'verify': self.doVerify,
@@ -244,6 +245,8 @@
self.certification.getHardware(Tags.make),
self.certification.getHardware(Tags.model))
self.getOSInfo()
+ if self.options.mode != Constants.auto:
+ self.catalog.getCertificationID(self.certification)
# save the certification info off to certification.xml
certificationDocument = CertificationDocument()
@@ -993,12 +996,13 @@
return self.__submit()
def __submit(self):
+ success = True
if self.certification and self.certification.getNumberOfTestRuns() > 0:
if self.options.mode != Constants.auto:
# optionally submit results to the catalog
- catalog = Catalog()
- if catalog.isReachable():
- catalog.submit(self.certification)
+ if self.catalog.isReachable():
+ if not self.catalog.submit(self.certification):
+ return False
report = Report(self.options, self.certification)
if report.WriteResultsRPM(self.environment.getLogDirectory()):
12 years, 1 month