Bug 812437 - getModuleFile may return 'null'
Summary: getModuleFile may return 'null'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Retired
Component: Test Suite (tests)
Version: 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Greg Nichols
QA Contact: Caspar Zhang
URL:
Whiteboard:
Depends On:
Blocks: 767775
TreeView+ depends on / blocked
 
Reported: 2012-04-13 17:31 UTC by Rob Landry
Modified: 2013-07-03 07:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
no tech note needed.
Clone Of:
Environment:
Last Closed: 2012-06-05 21:37:38 UTC
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0711 0 normal SHIPPED_LIVE v7 bug fix and enhancement update 2012-06-06 01:26:37 UTC

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


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