Bug 812437 - getModuleFile may return 'null'
getModuleFile may return 'null'
Status: CLOSED ERRATA
Product: Red Hat Hardware Certification Program
Classification: Red Hat
Component: Test Suite (tests) (Show other bugs)
3.2
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Greg Nichols
Caspar Zhang
:
Depends On:
Blocks: 767775
  Show dependency treegraph
 
Reported: 2012-04-13 13:31 EDT by Rob Landry
Modified: 2013-07-03 03:37 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
no tech note needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-05 17:37:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
info test patch to print error and handle errors finding the module file (1.51 KB, patch)
2012-04-20 09:05 EDT, Greg Nichols
no flags Details | Diff

  None (edit)
Description Rob Landry 2012-04-13 13:31:01 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.


Additional info:

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.
Comment 1 Greg Nichols 2012-04-18 11:40:53 EDT
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?
Comment 2 Rob Landry 2012-04-18 11:52:09 EDT
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
            return None
Comment 3 Greg Nichols 2012-04-20 08:53:53 EDT
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.
Comment 4 Greg Nichols 2012-04-20 09:05:06 EDT
Created attachment 578999 [details]
info test patch to print error and handle errors finding the module file
Comment 8 Caspar Zhang 2012-06-04 04:04:19 EDT
    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:
no tech note needed.
Comment 11 errata-xmlrpc 2012-06-05 17:37:38 EDT
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-2012-0711.html

Note You need to log in before you can comment on or make changes to this bug.