Bug 812437

Summary: getModuleFile may return 'null'
Product: [Retired] Red Hat Hardware Certification Program Reporter: Rob Landry <rlandry>
Component: Test Suite (tests)Assignee: Greg Nichols <gnichols>
Status: CLOSED ERRATA QA Contact: Caspar Zhang <czhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.2CC: czhang, gbai, qcai, rlandry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
no tech note needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-05 21:37:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 767775    
Attachments:
Description Flags
info test patch to print error and handle errors finding the module file none

Description Rob Landry 2012-04-13 17:31:01 UTC
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 15:40:53 UTC
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 15:52:09 UTC
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 12:53:53 UTC
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 13:05:06 UTC
Created attachment 578999 [details]
info test patch to print error and handle errors finding the module file

Comment 8 Caspar Zhang 2012-06-04 08:04:19 UTC
    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 21:37:38 UTC
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