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()
v7-commits@lists.stg.fedorahosted.org