libabigail review
AbandonedPublic

Authored by kparal on Apr 14 2016, 12:46 PM.

Details

Reviewers
None
Test Plan

-

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
kparal retitled this revision from to libabigail review.Apr 14 2016, 12:46 PM
kparal updated this object.
kparal edited the test plan for this revision. (Show Details)
kparal added inline comments.Apr 14 2016, 2:53 PM
run_abipkgdiff.py
5

You're relying on rpmUtils being installed, but you haven't specified it in the environment -> rpm section in task formula. Either you need to specify a dependency, or you're welcome to use a libtaskotron method for the same purpose, look at libtaskotron.ext.fedora.rpm_utils.rpmformat().

74–75

Do you know '='*70 ? :-)

87–89

When I ran this check on lyx package, it took my computer 12 minutes to compare packages for a single architecture. That's really long, and we have a watchdog which kills a task that doesn't print anything to terminal for 20 minutes. I'd recommend you to add a print command before running each comparison to make sure the watchdog doesn't consider the task as stuck. Something like:

print 'Comparing files %s and %s...' % (rpm1, rpm2)
proc = subprocess.Popen(...
91

You can do

stdout, stderr = proc.communicate()

which immediately makes it more readable. Just a tip.

100–125

I have tried to compare lyx-2.1.4-6.fc24 and lyx-2.1.4-7.fc24. I have seen the same output printed out twice, once prefixed with "ABI changes found between" and once with "Incompatible ABI changes between". I think it is caused by using & (bitwise and) instead of == (equals), but my head spins around when I'm thinking about bitwise operations, so that's just a guess (please don't use them, they are ugly). Also, you should use elif in all those if clauses after the first one (in that case you can get rid of proc.returncode checking in all of them), or use continue at the end of each block, just to prevent such issues. (You should also print some warning or raise an error if the return code is something that you did not expect).

135–136

We have recently renamed summary to note and intend to use it for additional useful information on top of the basic info like koji_build etc. See note documentation at https://docs.qadevel.cloud.fedoraproject.org/libtaskotron/latest/docs/library.html#libtaskotron.check.CheckDetail . I'd probably avoid using note in this case, because it does not add any extra information. Unless you want to parse the output and display something like 5 function changes, 3 variable changes.

137–138

Since you're checking this per-arch, you need to specify in the CheckDetail that this is a result just for a particular arch. You can do that like this:

details.keyvals['arch'] = arch

(This is obscure and undocumented, we'll need to improve this.)

Please note that you should use the "base arch" here, so i386 instead of i686, and armhfp instead of armv7hl. Use libtaskotron.arch_utils.basearch() to convert it.

kparal added inline comments.Apr 14 2016, 8:45 PM
run_abipkgdiff.py
100–125

I looked at abidiff return values documentation, and realized these are really supposed to be bitwise operations. In that case please ignore the previous comment. However, there is still a bug somewhere, because the output was duplicated in my case. Here's the log:
http://paste.fedoraproject.org/355658/46066663/

Thanks Kamil for the quick review.

This is first time I am using Phabricator, so please excuse me if I miss something or made any mistake while commenting :)

Made changes as per inline comments provided and changes has been done in commit https://github.com/sinnykumari/task-libabigail/commit/752ace2c74b2ccc5aa37a3b6fcaa10e18d4d7cba in develop branch . I have created develop branch and started pushing changes in this branch first.

run_abipkgdiff.py
5

Added yum package in environment section so that it can use rpmUtils.
I looked into libtaskotron.ext.fedora.rpm_utils.rpmformat() function but can't use it right now because it returns a single string for one request. I am interested in storing n,v,e,r,a separately and rpmUtils.miscutils.splitFilename() provides required information in a single call.

74–75

Thanks, I didn't come to my mind that such feature will be already available in Python. Changed code accordingly.

87–89

Ah, didn't know that there is a 20 minutes watchdog. I have added print message before start of each ABI comparison.

91

Thanks for suggestion. Saving return values in above format now.

100–125

Good catch. Reason of having twice same message is that when Incompatible ABI changes occur then it is obvious that ABI changes also occur. So, both bit gets set during Incompatible ABI changes. It is also mentioned in abidiff return value documentation https://sourceware.org/libabigail/manual/abidiff.html#return-values .

I have modified code to look for ABI change (ABIDIFF_ABI_CHANGE.) bit value only when Incompatible ABI changes (ABIDIFF_ABI_INCOMPATIBLE_CHANGE.) didn't occur.

135–136

For now, I have removed summary since I am not parsing abi changes result. In future, if there is a plan to parse output then I will keep in mind to use note instead of summary.

137–138

Thanks for the info. Added

detail.keyvals['arch'] = arch_utils.basearch(arch)

to save per arch detail.

kparal abandoned this revision.May 13 2016, 8:04 AM

This was done, closing.