Red Hat Bugzilla – Bug 812437
getModuleFile may return 'null'
Last modified: 2013-07-03 03:37:41 EDT
Description of problem:
In the getModuleFile function; the 'if' in
if sysSrcVersion == modInfoSrcVersion:
masks the 'try' failure and allows getModuleFile to return null instead of error. This in turn allows (at least some) DUPs to run the abi check.
Originally it was intended that DUPs would not run through the abi check; we now have the gray list and should run all non-kernel provided modules through the abi check.
getModuleFile is used a few times who's use needs to be verified after the above failure masking is resolved.
if the conditional fails (sysSrcVersion != modInfoSrcVersion) we could add an "Error: " message, but should the module file be returned via the modinfo call, or None?
Looks like the alternative is to not fix getModuleFile but to let it return null and put in some checks? getModuleFile is called 3 times, only one of those is then verified to see if it returned null.
def readModule(self, module):
'''Read in symbols from a module'''
symbols = list()
moduleFile = self.getModuleFile(module)
if not moduleFile:
print "Error: Can not find module file for %s" % module
We probably need both - an error message within getModuleFile could give more information about the problem, and it looks like the calling code needs some revision as well.
Created attachment 578999 [details]
info test patch to print error and handle errors finding the module file
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.
no tech note needed.
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.