Misleading error message in lock tests

Bug #1915018 reported by Karel Pičman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
litmus (Ubuntu)
New
Undecided
Unassigned

Bug Description

I think that in the error message of getlock method are swapped got and wanted lock types.

if (scope != reslock.scope) {
        t_context("requested lockscope not satisfied! got %s, wanted %s",
                  scope == ne_lockscope_exclusive ? "exclusive" : "shared",
                  reslock.scope == ne_lockscope_exclusive ?
                  "exclusive" : "shared");
        ne_unlock(i_session, &reslock);
        return FAIL;
    }

I'd patch it as follows:

line 86 -- t_context("requested lockscope not satisfied! got %s, wanted %s",

line 86 ++ t_context("requested lockscope not satisfied! wanted %s, got %s",

Tags: patch
Revision history for this message
Karel Pičman (karel-picman) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "A patch fixing the reported problem." seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.