Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 851215 Details for
Bug 1054386
video test traceback when no display is connected
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to handle IO exception when log files are missing, and to check both displays (:0 and :2).
0002-1054386-video-test-traceback-when-no-display-is-conn.patch (text/plain), 5.03 KB, created by
Greg Nichols
on 2014-01-16 17:54:11 UTC
(
hide
)
Description:
patch to handle IO exception when log files are missing, and to check both displays (:0 and :2).
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2014-01-16 17:54:11 UTC
Size:
5.03 KB
patch
obsolete
>From d5b68fdd31d83fe7aaf6aa9d1c61fdfa47b354bb Mon Sep 17 00:00:00 2001 >From: Greg Nichols <gnichols@redhat.com> >Date: Thu, 16 Jan 2014 12:52:37 -0500 >Subject: [PATCH 2/2] 1054386 - video test traceback when no display is > connected > >--- > tests/video/video.py | 63 ++++++++++++++++++---------------------------------- > 1 file changed, 22 insertions(+), 41 deletions(-) > >diff --git a/tests/video/video.py b/tests/video/video.py >index 4484010..7f4cfef 100644 >--- a/tests/video/video.py >+++ b/tests/video/video.py >@@ -99,23 +99,6 @@ class VideoTest(Test): > print "Depth flag: " + self.Xconfig_flag > return True > >- def copyXLog(self): >- # copy the X logs to the output >- for display in ["0", self.display]: >- log = "/var/log/Xorg.%s.log" % display >- if os.path.exists(log): >- shutil.copy(log, ".") >- xlog = open(log) >- print "\n%s:\n --------------------------------" >- while 1: >- line = xlog.readline() >- if line: >- print line >- else: >- break >- xlog.close() >- return True >- > def checkDepthAndResolution(self): > success = True > # try to get the current screen resolution and color depth first >@@ -146,16 +129,16 @@ class VideoTest(Test): > > return success > >- def checkXModules(self): >- logPath = "/var/log/Xorg.0.log" >- log = open(logPath, "r") >- if not log: >+ def checkXModules(self, display): >+ logPath = "/var/log/Xorg.%s.log" % display >+ try: >+ log = open(logPath, "r") >+ except IOError: > print "Error: could not open %s" % logPath > return False > > success = True >- print "Checking loaded X modules -----------------------\n" >- print "X log file: %s" % logPath >+ print "Checking %s for loaded X modules -----------------------" % logPath > for line in log.readlines(): > # this presumes Loading lines that include a slash means a path > if line.find("(II) Loading /") >= 0: >@@ -184,7 +167,7 @@ class VideoTest(Test): > > vendor = Command("rpm -qf %s --qf %%{VENDOR}" % xmoduleFile).getString() > if vendor in goodVendorList: >- pass >+ print "Found %s by %s" % (xmoduleFile, vendor) > elif vendor in warnVendorList: > print "Warning: %s module %s found" % (vendor, xmoduleFile) > else: >@@ -202,11 +185,12 @@ class VideoTest(Test): > > return result > >- def logDriverInfo(self): >+ def logDriverInfo(self, display): > libDir = "/usr/lib64" if platform.architecture()[0] == "64bit" else "/usr/lib" >- logPath = "/var/log/Xorg.0.log" >- log = open(logPath, "r") >- if not log: >+ logPath = "/var/log/Xorg.%s.log" % display >+ try: >+ log = open(logPath, "r") >+ except IOError: > print "Error: could not open %s" % logPath > return False > print "\nDriver Info from %s:\n-------------------------------------------------" % logPath >@@ -233,13 +217,9 @@ class VideoTest(Test): > break > print "-------------------------------------------------" > >- # Should this output be stored in attachments? >- Command("xvinfo").echoIgnoreErrors() >- print "-------------------------------------------------" >- Command("xdriinfo").echoIgnoreErrors() >- print "-------------------------------------------------" >- Command("glxinfo").echoIgnoreErrors() >- print "-------------------------------------------------" >+ for command in ["xvinfo", "xdrinfo", "glxinfo"]: >+ print "\n%s ----------------------------------------" % command >+ Command(command).echoIgnoreErrors() > > return True > >@@ -255,7 +235,7 @@ class VideoTest(Test): > try: > print "Running: " + startxCommand > self.xServer = Command(startxCommand) >- self.xServer.start() >+ self.xServer.run() > print "process %s" % self.xServer.getPID() > except HwCertCommandException, e: > print "Error: %s failed" % startxCommand >@@ -269,7 +249,7 @@ class VideoTest(Test): > glxGears = Command("glxgears -display :2") > print glxGears.command > try: >- glxGears.start() >+ glxGears.run() > lines = 0 > while lines < 5: > line = glxGears.readline() >@@ -327,10 +307,11 @@ class VideoTest(Test): > > def logModulesAndDrivers(self): > success = self.checkDepthAndResolution() >- if not self.checkXModules(): >- success = False >- if not self.logDriverInfo(): >- success = False >+ for display in ["0", self.display]: >+ if not self.checkXModules(display): >+ success = False >+ if not self.logDriverInfo(display): >+ success = False > > return success > >-- >1.8.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1054386
: 851215 |
851226