Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1596754 - iblinkinfo --diffcheck does not accept as many keys as the man page indicates
Summary: iblinkinfo --diffcheck does not accept as many keys as the man page indicates
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: infiniband-diags
Version: 7.6
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 7.6
Assignee: Honggang LI
QA Contact: Mike Stowell
URL:
Whiteboard:
Depends On:
Blocks: 1532680
TreeView+ depends on / blocked
 
Reported: 2018-06-29 15:47 UTC by Charles Haithcock
Modified: 2018-10-30 11:18 UTC (History)
5 users (show)

Fixed In Version: infiniband-diags-2.0.0-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 11:17:35 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3208 None None None 2018-10-30 11:18:34 UTC

Description Charles Haithcock 2018-06-29 15:47:04 UTC
Description of problem:

The man page for iblinkinfo --diffcheck indicates: 


--diffcheck <key(s)> Specify what diff checks should  be  done  in  the
       --diff  option  above.  Comma separate multiple diff check key(s).  The
       available diff checks are: sw = switches, ca = channel adapters, router
       =  routers,  port  =  port  connections,  lid  =  lids, nodedesc = node
       descriptions.


However, the source takes only 'port', 'state', 'lid', and 'nodedesc': 

src/iblinkinfo.c:
static int process_opt(void *context, int ch, char *optarg)
{
        struct ibnd_config *cfg = context;
        char *p;

        switch (ch) {
- - - - - - - - - - - - [SNIP] - - - - - - - - - - - - 
        case 4:                         // --diffcheck 
                diffcheck_flags = 0;
                p = strtok(optarg, ",");
                while (p) {
                        if (!strcasecmp(p, "port"))
                                diffcheck_flags |= DIFF_FLAG_PORT_CONNECTION;
                        else if (!strcasecmp(p, "state"))
                                diffcheck_flags |= DIFF_FLAG_PORT_STATE;
                        else if (!strcasecmp(p, "lid"))
                                diffcheck_flags |= DIFF_FLAG_LID;
                        else if (!strcasecmp(p, "nodedesc"))
                                diffcheck_flags |= DIFF_FLAG_NODE_DESCRIPTION;
                        else {
                                fprintf(stderr, "invalid diff check key: %s\n",
                                        p);
                                return -1;
                        }
                        p = strtok(NULL, ",");
                }
                break;




Version-Release number of selected component (if applicable):

infiniband-diags-2.0.0


How reproducible:

Always


Steps to Reproduce:
1. run 'ibdiagnet --diffcheck sw --diff <cache file>' or something similar 
2.
3.

Actual results:

"invalid diff check key: ..." errors


Expected results:


Additional info:

Comment 2 Charles Haithcock 2018-06-29 15:51:32 UTC
As an aside, if this is a problem with documentation rather than functionality, I can simply clone this case for docs and close this out.

Comment 3 Honggang LI 2018-07-10 02:47:46 UTC
https://github.com/linux-rdma/infiniband-diags/pull/15

This documentation issue will be fixed in upstream. Will backport it for rhel-7.6.

Comment 6 Mike Stowell 2018-08-07 18:43:35 UTC
Verified infiniband-diags-2.0.0-2.el7.x86_64 contains the updated manpage text:

$ man iblinkinfo
[...]
       --diffcheck  <key(s)>  Specify  what  diff checks should be done in the --diff option above.  Comma separate
       multiple diff check key(s).  The available diff checks are: port = port connections, state = port state, lid
       = lids, nodedesc = node descriptions.  Note that port, lid, and nodedesc are checked only for the node types
       that are specified (e.g.  switches-only, cas-only).  If port is specified alongside lid or nodedesc,  remote
       port lids and node descriptions will also be compared.
[...]

Comment 8 errata-xmlrpc 2018-10-30 11:17:35 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.

https://access.redhat.com/errata/RHBA-2018:3208


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