r882 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-04-18 13:34:18 +0000 (Mon, 18 Apr 2011)
New Revision: 882
Modified:
trunk/v7.spec.in
Log:
changelog
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2011-04-18 13:31:44 UTC (rev 881)
+++ trunk/v7.spec.in 2011-04-18 13:34:18 UTC (rev 882)
@@ -67,6 +67,15 @@
/etc/init.d/v7
%changelog
+* Mon Apr 18 2011 Greg Nichols <gnichols(a)redhat.com>
+
+V7 1.3 R29
+
+ 626970 - FEAT: kdump test needs to verify kdump
+ 697017 - video test uses xdpyinfo and should require xorg-x11-utils
+ 649520 - fv_* tests are not being planned on 32-bit RHEL5.5
+ 693429 - v7: clocktest only works up to 1024p
+
* Thu Apr 14 2011 Greg Nichols <gnichols(a)redhat.com>
V7 1.3 R28
13 years
r881 - trunk/tests/core
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-04-18 13:31:44 +0000 (Mon, 18 Apr 2011)
New Revision: 881
Modified:
trunk/tests/core/clocktest.c
Log:
693429 - v7: clocktest only works up to 1024p
Modified: trunk/tests/core/clocktest.c
===================================================================
--- trunk/tests/core/clocktest.c 2011-04-18 13:29:53 UTC (rev 880)
+++ trunk/tests/core/clocktest.c 2011-04-18 13:31:44 UTC (rev 881)
@@ -16,13 +16,29 @@
#define NSEC(ts) (ts.tv_sec*NSEC_PER_SEC + ts.tv_nsec)
#ifdef OLD_SCHED_SETAFFINITY
-#define setaffinity(mask) sched_setaffinity(0,&mask)
+#define setaffinity(mask) sched_setaffinity(0,mask)
#else
-#define setaffinity(mask) sched_setaffinity(0,sizeof(mask),&mask)
+#ifdef CPU_ALLOC
+#define setaffinity(mask) sched_setaffinity(0,CPU_ALLOC_SIZE(num_cpus),mask)
+#else
+#define setaffinity(mask) sched_setaffinity(0,sizeof(cpu_set_t),mask)
#endif
+#endif
+
+#ifdef CPU_ALLOC
+cpu_set_t* cpu_alloc(unsigned num_cpus){
+ printf("using CPU_CALLOC\n");
+ return CPU_ALLOC(num_cpus);
+}
+#else
+cpu_set_t* cpu_alloc(unsigned num_cpus){
+ return malloc(sizeof(cpu_set_t));
+}
+#endif
+
int test_clock_jitter(){
- cpu_set_t cpumask;
+ cpu_set_t* cpumask;
struct timespec *time;
unsigned long nsec;
unsigned slow_cpu, fast_cpu;
@@ -44,10 +60,11 @@
printf ("Testing for clock jitter on %u cpus\n", num_cpus);
time=malloc(num_cpus * sizeof(struct timespec));
+ cpumask = cpu_alloc(num_cpus);
for (iter=0; iter<ITERATIONS; iter++){
for (cpu=0; cpu < num_cpus; cpu++) {
- CPU_ZERO(&cpumask); CPU_SET(cpu,&cpumask);
+ CPU_ZERO(cpumask); CPU_SET(cpu,cpumask);
if (setaffinity(cpumask) < 0){
perror ("sched_setaffinity"); return 1;
}
13 years
r880 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-04-18 13:29:53 +0000 (Mon, 18 Apr 2011)
New Revision: 880
Modified:
trunk/v7/test.py
Log:
649520 - fv_* tests are not being planned on 32-bit RHEL5.5
Modified: trunk/v7/test.py
===================================================================
--- trunk/v7/test.py 2011-04-18 13:28:51 UTC (rev 879)
+++ trunk/v7/test.py 2011-04-18 13:29:53 UTC (rev 880)
@@ -515,7 +515,7 @@
self.isProcessLimited = False
try:
arch = Command("uname -i").getString()
- if (arch == "i386" or arch == "s390" )and self.freeMemory > 1024:
+ if (arch in [Constants.i386, Constants.i686, Constants.s390])and self.freeMemory > 1024:
self.isProcessLimited = True
self.processMemory = 1024 # MB, due to 32-bit address space
print "%s arch, Limiting Process Memory: %u" % (arch, self.processMemory)
13 years
r879 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-04-18 13:28:51 +0000 (Mon, 18 Apr 2011)
New Revision: 879
Modified:
trunk/v7/fvtest.py
Log:
649520 - fv_* tests are not being planned on 32-bit RHEL5.5
Modified: trunk/v7/fvtest.py
===================================================================
--- trunk/v7/fvtest.py 2011-04-18 13:27:14 UTC (rev 878)
+++ trunk/v7/fvtest.py 2011-04-18 13:28:51 UTC (rev 879)
@@ -171,7 +171,7 @@
# if Red Hat and not RT kernel
if "Red Hat" in self.redHatRelease.getProduct() and self.redHatRelease.getKernelFlavor() != Constants.rt:
# if RHEL5 and i386 or x86_64, or RHEL6+ and x86_64
- if ((self.redHatRelease.getVersion() is 5 and self.redHatRelease.getArch() in [Constants.i386, Constants.x86_64])
+ if ((self.redHatRelease.getVersion() is 5 and self.redHatRelease.getArch() in [Constants.i386, Constants.i686, Constants.x86_64])
or (self.redHatRelease.getVersion >= 6 and self.redHatRelease.getArch() == Constants.x86_64)):
osSupport = True
# Fedora x86_64
13 years
r878 - trunk/tests/video
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-04-18 13:27:14 +0000 (Mon, 18 Apr 2011)
New Revision: 878
Modified:
trunk/tests/video/video.py
Log:
697017 - video test uses xdpyinfo and should require xorg-x11-utils
Modified: trunk/tests/video/video.py
===================================================================
--- trunk/tests/video/video.py 2011-04-18 13:23:53 UTC (rev 877)
+++ trunk/tests/video/video.py 2011-04-18 13:27:14 UTC (rev 878)
@@ -73,11 +73,13 @@
def getRequiredRPMs(self):
rpms = ["xorg-x11-apps"]
+ rpms.append("xorg-x11-utils") # for xdpyinfo
if "Red Hat" in self.redHatRelease.getProduct() and self.redHatRelease.getVersion() < 6:
rpms.append("system-config-display") # for system-config-display
else:
rpms.append("xorg-x11-server-Xorg") # for X
rpms.append("xorg-x11-xinit") # for startx
+
return rpms
13 years
r877 - trunk/tests/reboot
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-04-18 13:23:53 +0000 (Mon, 18 Apr 2011)
New Revision: 877
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 13:23:33 UTC (rev 876)
+++ trunk/tests/reboot/reboot.py 2011-04-18 13:23:53 UTC (rev 877)
@@ -43,6 +43,22 @@
rpms = ["kernel-debug", "kernel-debuginfo", "kexec-tools"]
return rpms
+ def plan(self, devices):
+ tests = list()
+ # plan reboot twice: once on storage (local disk) and once over network
+ for dumpMethod in [Constants.nfs, Constants.local]:
+ test = self.makeCopy()
+ test.setLogicalDeviceName(dumpMethod)
+ tests.append(test)
+ 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()
+ return False
+ return True
+
+
def tags(self):
return [TestTag.noninteractive, TestTag.certification]
@@ -90,13 +106,39 @@
try:
configFile = ConfigFile(self.kdumpConfigPath)
coreCollector = configFile.getParameter("core_collector")
+ net = configFile.getParameter("net")
except IOError, exception:
print "Error: %s" % exception
return False
+ restart = False
if not coreCollector:
- print "Adding core_collector = %s to /etc/kdump.conf" % self.coreCollector
+ print "Adding core_collector = %s to %s" % (self.coreCollector, self.kdumpConfigPath)
configFile.addParameter("core_collector", self.coreCollector)
+ restart = True
+ else:
+ print "core_collector currently set to \"" + coreCollector + "\""
+
+ if net:
+ if self.getLogicalDeviceName() == Constants.local:
+ print "removing net setting for local disk dump"
+ configFile.removeParameter("net")
+ restart = True
+ else:
+ print "Network Dump set to %s" % net
+ elif self.getLogicalDeviceName() == Constants.nfs:
+ if self.getTestServer():
+ net = "%s:/var/v7/export" % self.getTestServer()
+ print "Adding net %s to %s" % (net, self.kdumpConfigPath)
+ configFile.addParameter("net", net)
+ restart = True
+ else:
+ print "Error: v7 test server not set for network dump"
+ return False
+
+
+ if restart:
+ configFile.save()
print "restarting kdump with new configuration..."
try:
Command("service kdump stop").echo()
@@ -105,12 +147,9 @@
print "Error: kdump restart failed"
print exception
exception.command.printErrors()
- verified = False
- else:
- print "core_collector currently set to \"" + coreCollector + "\""
+ verified = False
-
print "Checking kdump service"
try:
kdump = Command("service kdump status")
@@ -170,12 +209,10 @@
return False
def verifyKDumpImage(self):
- # parse /etc/kdump.conf to find the location of the image file
- configFile = ConfigFile(self.kdumpConfigPath)
- imageDirectory = configFile.getParameter("path")
- if not imageDirectory:
- imageDirectory = "/var/crash"
-
+ imageDirectory = self.getImageDirectory()
+ if not imageDirectory():
+ return False
+
# 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]+)")
@@ -217,7 +254,32 @@
crash.printErrors()
return False
+
+ def getImageDirectory(self):
+ # parse /etc/kdump.conf to find the location of the image file
+ configFile = ConfigFile(self.kdumpConfigPath)
+ imageDirectory = configFile.getParameter("path")
+ if not imageDirectory:
+ imageDirectory = "/var/crash"
+
+ # if nfs network dump, mount the filesystem
+ net = configFile.getParameter("net")
+ if net:
+ print "Attempting to mount net setting %s as nfs."
+ try:
+ localPath = "v7-net"
+ Command("mkdir %s" % localPath).echo()
+ Command("mount %s %s" % (net, localPath).echo())
+ imageDirectory = os.path.join(localPath, imageDirectory)
+ except V7CommandException, exception:
+ print "Error: could not mount nfs image directory"
+ print exception
+ print exception.command.printErrors()
+ return None
+ print "Looking for vmcore image directories under " + imageDirectory
+ return imageDirectory
+
def run(self):
PASSED = 0
13 years
r876 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-04-18 13:23:33 +0000 (Mon, 18 Apr 2011)
New Revision: 876
Modified:
trunk/v7/configfile.py
Log:
626970 - FEAT: kdump test needs to verify kdump
Modified: trunk/v7/configfile.py
===================================================================
--- trunk/v7/configfile.py 2011-04-18 13:23:21 UTC (rev 875)
+++ trunk/v7/configfile.py 2011-04-18 13:23:33 UTC (rev 876)
@@ -23,10 +23,13 @@
def __init__(self, filePath):
self.filePath = filePath
self.parameters = None
+ self.__parse()
+ self.modified = False
def __parse(self):
file = open(self.filePath)
- for line in file.readlines():
+ self.lines = file.readlines()
+ for line in self.lines:
# skip comment lines
if line.strip() and line.strip()[0] == "#":
continue
@@ -38,8 +41,6 @@
file.close()
def getParameter(self, name):
- if not self.parameters:
- self.__parse()
if self.parameters:
try:
return self.parameters[name]
@@ -48,21 +49,37 @@
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])
def addParameter(self, name, value):
if not self.getParameter(name):
- file = open(self.filePath, "a")
- file.write("%s %s\n" % (name, value))
- file.close()
+ self.parameters[name] = value
+ self.lines.append("%s %s\n" % name, value)
+ self.modified = True
return True
# otherwise
return False
+ def removeParameter(self, name):
+ if self.getParameter(name):
+ del self.parameters[name]
+ for line in self.lines:
+ # skip comment lines
+ if line.strip() and line.strip()[0] == "#":
+ continue
+ words = line.strip().split(" ")
+ if words[0] and words[0] == name:
+ self.lines.remove(line)
+ self.modified = True
+
+ def save(self):
+ if self.modified:
+ file = open(self.filePath, "w")
+ for line in self.lines:
+ file.write(line)
+
if __name__ == "__main__":
try:
confFile = ConfigFile("/etc/rc.local")
13 years
r875 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-04-18 13:23:21 +0000 (Mon, 18 Apr 2011)
New Revision: 875
Modified:
trunk/v7/tags.py
Log:
626970 - FEAT: kdump test needs to verify kdump
Modified: trunk/v7/tags.py
===================================================================
--- trunk/v7/tags.py 2011-04-15 14:04:31 UTC (rev 874)
+++ trunk/v7/tags.py 2011-04-18 13:23:21 UTC (rev 875)
@@ -173,6 +173,8 @@
TAINT_UNSIGNED_MODULE = 64 #kernel.h calls this TAINT_USER?
TAINT_TECHPREVIEW_MODULE = 256
i386="i386"
+ i686="i686"
+ s390="s390"
x86_64="x86_64"
interactive="interactive"
noninteractive="noninteractive"
@@ -181,7 +183,9 @@
DEBUG="DEBUG"
reboot="reboot"
panic="panic"
-
+ local="local"
+ nfs="nfs"
+ rcp="rcp"
class SystemFunction:
system = "system"
13 years
r874 - trunk/tests/network
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-04-15 14:04:31 +0000 (Fri, 15 Apr 2011)
New Revision: 874
Modified:
trunk/tests/network/network.py
Log:
524983 - v7 Network server blocked from working by SELinux
Modified: trunk/tests/network/network.py
===================================================================
--- trunk/tests/network/network.py 2011-04-14 16:21:23 UTC (rev 873)
+++ trunk/tests/network/network.py 2011-04-15 14:04:31 UTC (rev 874)
@@ -419,6 +419,7 @@
def startServer(self):
+ self.checkSELinux()
# start the bandwidth test server
sys.stdout.write("Starting lmbench services...")
sys.stdout.flush()
@@ -429,7 +430,7 @@
else:
print " done."
- # nfs
+ # nfs - leaving in so we can test prior v7 clients.
os.system("service nfs start")
dataDirectory = self.environment.getDataDirectory()
exportDirectory = dataDirectory + '/export'
@@ -446,6 +447,19 @@
# httpd
os.system("service httpd start")
+ def checkSELinux(self):
+ try:
+ selinuxParams = Command("/usr/sbin/sestatus")
+ selinuxMode = selinuxParams.getString(regex="Current mode:[ \t]+(?P<selinuxMode>[a-zA-Z]+)", regexGroup="selinuxMode", singleLine=False)
+ if selinuxMode != "permissive":
+ print "Warning: SELinux is in %s mode - it must be set to \"permissive\" for certification testing." % selinuxMode
+ return False
+ except V7CommandException, exception:
+ print "Warning: could not determine selinux parameters"
+ return False
+
+ return True
+
def stopServer(self):
sys.stdout.write("Stopping lmbench services...")
sys.stdout.flush()
13 years, 1 month
r873 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-04-14 16:21:23 +0000 (Thu, 14 Apr 2011)
New Revision: 873
Modified:
trunk/Makefile
Log:
R29
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-04-14 16:20:44 UTC (rev 872)
+++ trunk/Makefile 2011-04-14 16:21:23 UTC (rev 873)
@@ -14,7 +14,7 @@
# Author: Greg Nichols
V7_VERSION := 1.3
-V7_RELEASE := 28
+V7_RELEASE := 29
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, 1 month