[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: abi-compliance-checker and abi-dumper to track API/ABI

Markus Raab wrote:

Andrey Ponomarenko wrote:
There is a new simple way to track changes in API/ABI of system
libraries using a new ABI dumper [1] tool.
Thanks for the tipp!

However, this approach has some drawbacks. Perhaps the main drawback is
the inability to perform some compatibility checks. For example, there
is no possibility to check for changes in the values of the constants
(defines as well as const global data), since their values are inlined
at compile time, and not presented in the debug information of the
binary ELF-object.
The major issue is that these tools cannot check behavioral or semantic
incompatibility. (typically is described in the API-doc)

I suggest to package unit test of an library as extra package and then try
to upgrade the library, but not the unit tests. When you execute the unit
tests then you will get an ABI check for free. It might even include
semantic incompatibility or checks of constant/macro/enum changes, depending
how extensive the unit tests are.

Agree. But not every library has a test suite. In this case one can try to automagically generate tests by the api-sanity-checker [1] tool.

I implemented this for elektra and it worked quite well, see
(>= ${source:Version}) does the trick in libelektra-test.

In general, there can be checked about 98% of all
compatibility rules.
Is this number from your experience?

It's just about 98% from those collected during 4 years of development in the rules DB (194 binary-compatibility rules and 100 source-compatibility rules):

  abi-compliance-checker-1.99.7/modules/Rules{Bin, Src}.xml

I would expect that real-life problems are rather more subtle.

best regards

[1] https://github.com/lvc/api-sanity-checker

Andrey Ponomarenko, ROSA Lab.

Reply to: