Closed Bug 1423145 Opened 7 years ago Closed 6 years ago

NSS buildbot ABI check report a failure, because we don't look at the individual bits of the abidiff result code

Categories

(NSS :: Test, enhancement)

3.34
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: KaiE, Assigned: KaiE)

Details

Attachments

(2 files, 1 obsolete file)

The buildbot ABI checks currently fail with:
  TB [2017-12-04 21:55:48] FAILED: failure executing the ABI checks

The log files don't say what's happening, and I cannot figure it out by inspecting the build slave environment.

We should add better logging of the failed scenario.
Attached patch 1423145-v1.patchSplinter Review
Attachment #8934461 - Flags: review?(franziskuskiefer)
Assignee: nobody → kaie
Comment on attachment 8934461 [details] [diff] [review]
1423145-v1.patch

Review of attachment 8934461 [details] [diff] [review]:
-----------------------------------------------------------------

let's see what this tells us
Attachment #8934461 - Flags: review?(franziskuskiefer) → review+
We get nonzero return values from abidiff execution on the nspr4 library (for which currently a (whitelisted) difference is reported).

According to the manual page, nonzero return values aren't necessarily failures. The return value must be checked for individual bits to know what the return values means. Currently, we just treat any nonzero return as a failure.

We must update the build script to look at the individual bits, and don't fail on bits that indicate just a reported difference.
Summary: NSS buildbot ABI check fails, reason unknown, need more detailed error logging → NSS buildbot ABI check report a failure, because we don't look at the individual bits of the abidiff result code
Flags: needinfo?(kaie)
Here's documentation for the return values that will help the reviewer:
https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=blob;f=doc/manuals/abidiff.rst

(search for section "Return values")
Flags: needinfo?(kaie)
Attached patch 1423145-v2.patch (obsolete) — Splinter Review
Attachment #8936795 - Flags: review?(franziskuskiefer)
Comment on attachment 8936795 [details] [diff] [review]
1423145-v2.patch

Review of attachment 8936795 [details] [diff] [review]:
-----------------------------------------------------------------

::: automation/buildbot-slave/build.sh
@@ +275,5 @@
> +        ABIDIFF_ABI_CHANGE=$((($RET & 0x04) != 0))
> +        ABIDIFF_ABI_INCOMPATIBLE_CHANGE=$((($RET & 0x08) != 0))
> +        ABIDIFF_UNKNOWN_BIT_SET=$((($RET & 0xf0) != 0))
> +
> +        # If abidiff reports an error, or a usage error, or if it sets an result

nit: a result

@@ +282,5 @@
> +        # result report with our whitelist. This allows us to silence changes
> +        # that we're already aware of and have been declared acceptable.
> +
> +        REPORT_RET_AS_FAILURE=0
> +        if [ $ABIDIFF_ERROR -ne 0 ]; then

This should probably be a switch statement.

@@ +292,5 @@
> +        if [ $ABIDIFF_UNKNOWN_BIT_SET -ne 0 ]; then
> +            REPORT_RET_AS_FAILURE=1
> +        fi
> +
> +        if [ $REPORT_RET_AS_FAILURE -ne 0 ]; then

Maybe add some logging for the cases that we don't consider an error (then we'd have logging in every case).
Attachment #8936795 - Flags: review?(franziskuskiefer)
(In reply to Franziskus Kiefer [:fkiefer or :franziskus] from comment #7)
> @@ +282,5 @@
> > +        # result report with our whitelist. This allows us to silence changes
> > +        # that we're already aware of and have been declared acceptable.
> > +
> > +        REPORT_RET_AS_FAILURE=0
> > +        if [ $ABIDIFF_ERROR -ne 0 ]; then
> 
> This should probably be a switch statement.

I cannot follow your thought, can you describe how this would work?

Did you notice I'm checking three different variables?

Because we're checking for a bitmask, I don't see how a switch statement could efficiently check for all possible values.


> @@ +292,5 @@
> > +        if [ $ABIDIFF_UNKNOWN_BIT_SET -ne 0 ]; then
> > +            REPORT_RET_AS_FAILURE=1
> > +        fi
> > +
> > +        if [ $REPORT_RET_AS_FAILURE -ne 0 ]; then
> 
> Maybe add some logging for the cases that we don't consider an error (then
> we'd have logging in every case).

Very good idea, I'll add logging for each individual bit.
Attached patch 1423145-v3.patchSplinter Review
Attachment #8936795 - Attachment is obsolete: true
Attachment #8937407 - Flags: review?(franziskuskiefer)
Attachment #8934461 - Flags: checked-in+
Comment on attachment 8937407 [details] [diff] [review]
1423145-v3.patch

Review of attachment 8937407 [details] [diff] [review]:
-----------------------------------------------------------------

Oops forgot about this, sorry. Get it landed!
Attachment #8937407 - Flags: review?(franziskuskiefer) → review+
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: