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

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


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.

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?

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

best regards

Reply to: