Created attachment 520948 [details] proposed patch Description of problem: When Guangze executing info test (with a non-redhat module inserted), the following traceback displayed: Subtest: Modules - Check kernel modules checking modules... Error: Non-Red Hat driver vendor The ELRepo Project (http://elrepo.org) for module ac97_bus Error: Driver module ac97_bus was built on Build64R6.elrepo.org and not built at Red Hat. Red Hat Enterprise Linux 6 ABI -------------------------------- Module: ac97_bus Kernel: 2.6.32-71.el6.x86_64 Whitelist: /lib/modules/kabi/kabi_whitelist_x86_64 Note: ac97_bus seems to use only official ABI. Error: could not determine driver packaging info for module snd_hda_codec_nvhdmi "rpm -qf None --qf %{VENDOR}" no match for regular expression None Red Hat Enterprise Linux 6 ABI -------------------------------- Module: snd_hda_codec_nvhdmi Kernel: 2.6.32-71.el6.x86_64 Whitelist: /lib/modules/kabi/kabi_whitelist_x86_64 Traceback (most recent call last): File "/usr/bin/v7", line 45, in <module> success = v7.do(args) File "/usr/share/v7/lib/v7/hardwaretest.py", line 193, in do result = self.commands[self.command]() File "/usr/share/v7/lib/v7/hardwaretest.py", line 612, in doRun return self._doRun(tests) File "/usr/share/v7/lib/v7/hardwaretest.py", line 715, in _doRun returnValue = self.runTest(tmpDirectory, test, run, outputFilePath) File "/usr/share/v7/lib/v7/hardwaretest.py", line 1130, in runTest rv = test.run() File "/usr/share/v7/tests/info/info.py", line 433, in run if not self.runSubTest(self.checkModules, name="Modules", description="Check kernel modules"): File "/usr/share/v7/lib/v7/test.py", line 428, in runSubTest result = subtestFunction() File "/usr/share/v7/tests/info/info.py", line 202, in checkModules self.abiCheck(module) File "/usr/share/v7/tests/info/info.py", line 344, in abiCheck moduleSymbols = self.readModule(module) File "/usr/share/v7/tests/info/info.py", line 277, in readModule if not os.path.isfile(moduleFile): File "/usr/lib64/python2.6/genericpath.py", line 29, in isfile st = os.stat(path) TypeError: coercing to Unicode: need string or buffer, NoneType found So far we both couldn't reproduce it, but we do have a simple fix for it. diff --git a/tests/info/info.py b/tests/info/info.py index 94b9b9b..c3c1316 100644 --- a/tests/info/info.py +++ b/tests/info/info.py @@ -274,7 +274,7 @@ class InfoTest(Test): symbols = list() moduleFile = self.getModuleFile(module) - if not os.path.isfile(moduleFile): + if not moduleFile or not os.path.isfile(moduleFile): print "Error: Cannot read module file %s" % moduleFile return None since the parameter passed to os.path.isfile() couldn't be None, we could add one more check point. Version-Release number of selected component (if applicable): 1.4 R18 How reproducible: only once Steps to Reproduce: 1. Unclear 2. 3. Actual results: Expected results: Additional info:
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: In v7 1.3, sometimes v7 info test got a traceback when testing with 3rd-party modules. This issue has been fixed in v7 1.4, now no such traceback is printed in v7 info test.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1436.html