Merge lp:~michihenning/unity-scopes-api/abigail into lp:unity-scopes-api/devel

Proposed by Michi Henning
Status: Merged
Approved by: James Henstridge
Approved revision: 683
Merged at revision: 655
Proposed branch: lp:~michihenning/unity-scopes-api/abigail
Merge into: lp:unity-scopes-api/devel
Diff against target: 368 lines (+124/-96)
10 files modified
HACKING (+4/-7)
debian/VERSION (+1/-1)
debian/changelog (+24/-0)
debian/control.in (+2/-1)
test/CMakeLists.txt (+1/-1)
test/abi-compliance/CMakeLists.txt (+10/-6)
test/abi-compliance/abi.xml.in (+0/-57)
test/abi-compliance/check-abi-compliance.sh.in (+59/-21)
test/abi-compliance/gen-abi-dump.sh.in (+2/-2)
test/abi-compliance/suppressions (+21/-0)
To merge this branch: bzr merge lp:~michihenning/unity-scopes-api/abigail
Reviewer Review Type Date Requested Status
James Henstridge Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+285551@code.launchpad.net

Commit message

Changed from acc-compliance-checker to abigail for ABI test.

Description of the change

I think this is good to go now. I've tested both on Jenkins and in a silo.

We now use abigail instead of abi-compliance-checker for ABI testing.

The approach is much the same: dump the current ABI and compare that against a saved dump of the base ABI.

Due to some minor problems with abidiff suppressions and abidiff exit status, the check script currently suppresses output about added functions wholesale and then tests for success by checking that the generated report is empty. Once we a get a new version of abidiff, I'll update the check script to fail for added functions, so we can review explicitly what was added by a new version, and then add suppression directives as appropriate. This will serve as good sanity check (and the generated output is quite readable, so it's easy to do).

This does not affect the safety of the check: despite the work-around, we *will* reliably detect ABI breakage (just not as elegantly as I would like).

Abigail is faster than abi-compliance-checker. This is particularly noticeable on Arm, where it takes six minutes instead of over 20.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
677. By Michi Henning

Added test go guard against compilations without -g.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
678. By Michi Henning

Test was broken.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

This looks pretty good. I've left a few inline comments about possible simplifications/improvements, but this is definitely on the right track.

review: Needs Fixing
Revision history for this message
Michi Henning (michihenning) wrote :

> This looks pretty good. I've left a few inline comments about possible
> simplifications/improvements, but this is definitely on the right track.

Thanks for the review!

I've fixed the gunzip issue and added back a comment in HACKING about where to find the report

With the cmake thing, I stuffed around with that for quite a while. The custom command to dump the abi is necessary because it needs to be dumped whenever it isn't there yet, or after the library has been rebuilt.

For the check-abi step, I want to make sure that the test runs every time, whether the abi dump is new or not. With a naive approach, using add_custom_target/add_custom_command, the problem was that, after the test was run once, running it again wouldn't do anything, even when the ABI was broken (because the report file was up-to-date).

But, to force re-generation of the abi dump if necessary, I *have* to use a a custom command that depends on the dump file. In the end, the only reliable way I managed to come up with was to use the dummy output file. If there is a simpler way of doing this, I'd like to find out though. Every time I use add_custom_target/add_custom_command, my mind turns into a pretzel. I find this uniquely awkward to use, much worse than a makefile, as a matter of fact :-(

With the suppressions, things are in progress. There *is* a bug, but in a slightly different shape than I thought. Dodji has come up with a work-around the deals with the problem I was seeing though. So, on Monday, I think I'll be able to turn suppressions on and do things properly (with a slight hack in the suppressions file). I'll push another branch then with a link to the bug tracker as appropriate.

If there is any cargo-culting, it'll at least be cleaner cargo after that :-)

PS: Have you ever read "Dream Park--The California Voodoo Game"? If not, do. You will probably enjoy it :-)

Revision history for this message
James Henstridge (jamesh) wrote :

Okay, so I guess there are two options here:

1. If you want to generate a new dump as part of the vbuild process, why not just have a custom_command that depends on the libunity-scopes target and outputs the ABI dump, rather than dealing with the "run_always" bits?

2. Do you even need to dump the current ABI to an XML file as part of the test? Might it be quicker to just have abidiff compare the reference XML dump against the just-built .so file? That would reduce the number of moving parts in the test, and would likely be even faster.

I can understand having a helper script to generate a dump based on the just-built library, but it doesn't seem like a prerequisite for running the tests.

679. By Michi Henning

Some review comments from James.

Changed script to use suppressions file after getting a work-around for the partial
suppressions from Dodji.

Revision history for this message
Michi Henning (michihenning) wrote :

> Okay, so I guess there are two options here:
>
> 1. If you want to generate a new dump as part of the vbuild process, why not
> just have a custom_command that depends on the libunity-scopes target and
> outputs the ABI dump, rather than dealing with the "run_always" bits?

Now I'm confused. I already have this command:

add_custom_command(
    OUTPUT ${abi_dump_file}
    COMMAND ${abi_dump_cmd}
    DEPENDS ${UNITY_SCOPES_LIB})

add_custom_target(gen-abi-dump DEPENDS ${abi_dump_file})

This generates the dump if the dump doesn't exist yet or is out of date with respect to the library.

The run always hack is necessary because, without it, a "make test" will correctly complain the first time but, if I have a failure the first time and then do "make test" again, I end up with nothing being done at all, because nothing is out of date, and the second run then incorrectly reports success when, in fact, the failure is still there.

> 2. Do you even need to dump the current ABI to an XML file as part of the
> test? Might it be quicker to just have abidiff compare the reference XML dump
> against the just-built .so file? That would reduce the number of moving parts
> in the test, and would likely be even faster.

I considered doing this, but decided not to. Any speed difference is completely unnoticeable because analysing the dump takes many times longer than uncompressing it. That's for a large dump. For a small dump, the difference is also unnoticeable because a small dump will uncompress very quickly.

And I figured it would be useful to leave the dump behind. When something goes wrong, and people want to dig into it, they don't have to copy and uncompress it manually, making sure that they use the correct arch subdirectory.

The dump file is also useful for reporting issues with abidiff, because I have everything I need (both dumps and the suppressions file) right there.

I've updated the clean target though to get rid of the base dump, so a "make clean" actually reclaims the disk space.

> I can understand having a helper script to generate a dump based on the just-
> built library, but it doesn't seem like a prerequisite for running the tests.

The helper script to create the dump is useful for generating the dump by hand (say, for debugging). It also avoids a needless dump on Vivid. Doing that sort of thing directly in cmake rapidly gets cumbersome. Using the helper script is cleaner, I think?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
680. By Michi Henning

Fix exit status in currently unused code.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
681. By Michi Henning

Added comment.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
682. By Michi Henning

Merged devel.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

> > 2. Do you even need to dump the current ABI to an XML file as part of the
> > test? Might it be quicker to just have abidiff compare the reference XML
> dump
> > against the just-built .so file? That would reduce the number of moving
> parts
> > in the test, and would likely be even faster.
>
> I considered doing this, but decided not to. Any speed difference is
> completely unnoticeable because analysing the dump takes many times longer
> than uncompressing it. That's for a large dump. For a small dump, the
> difference is also unnoticeable because a small dump will uncompress very
> quickly.
>
> And I figured it would be useful to leave the dump behind. When something goes
> wrong, and people want to dig into it, they don't have to copy and uncompress
> it manually, making sure that they use the correct arch subdirectory.
>
> The dump file is also useful for reporting issues with abidiff, because I have
> everything I need (both dumps and the suppressions file) right there.
>
> I've updated the clean target though to get rid of the base dump, so a "make
> clean" actually reclaims the disk space.

I was curious what the time difference was, so I ran a few tests on my Chromebook (since armhf always seems to be the last to finish building, and hopefully the Chromebook is similar enough). I used the vivid versions of abigail and extracted the latest Xenial builds of libunity-scopes-api (this uses detached debug info, but hopefully that doesn't influence things too much).

First of all, the timings to extract an ABI dump and compare it to itself:

    $ time abidw --debug-info-dir root/usr/lib/debug root/usr/lib/arm-linux-gnueabihf/libunity-scopes.so.1.0.3 > dump.xml
    real 1m25.146s
    user 1m21.865s
    sys 0m2.975s

    $ time abidiff dump.xml dump.xml
    real 3m4.622s
    user 3m1.870s
    sys 0m2.565s

And as the alternative I was suggesting, comparing the XML dump against the library itself:

    $ time abidiff --debug-info-dir2 root/usr/lib/debug dump.xml root/usr/lib/arm-linux-gnueabihf/libunity-scopes.so.1.0.3
    real 2m30.120s
    user 2m27.060s
    sys 0m2.605s

So in addition to saving the 1.5 minutes taken to create the XML dump, the actual comparison process took 30 seconds less. All up, that's a 45% reduction in runtime

The times with the xenial version of abigail-tools seem a bit different on my amd64 box, but I'm still seeing significantly lower overall time for abidiff against the .so vs. abidw+abidiff.

Revision history for this message
James Henstridge (jamesh) wrote :

Just recording part of a conversation from IRC. Michi got the following error when comparing the XML dump to the shared library on his system:

http://pastebin.ubuntu.com/15070257/

In the XML dump, these are defined here:

    <elf-symbol name='_ZN5unity6scopes15ConfigExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' type='func-type' binding='global-binding' alias='_ZN5unity6scopes15ConfigExceptionC2ERKS1_' is-defined='yes'/>
    <elf-symbol name='_ZN5unity6scopes15ConfigExceptionC2ERKS1_' type='func-type' binding='global-binding' is-defined='yes'/>

The "alias" attribute on the first line seems erroneous, since the first mangled name is ConfigException(std::string const&), while the second is ConfigException(ConfigException const&). These are clearly not the same symbol, so I'm not sure why they'd be listed as such here.

683. By Michi Henning

Fixed broken clean target.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote :

Dodji has fixed the issues around he different behaviour when using a dump vs comparing the base dump against the .so.

We'll have to wait until the next version of abigail makes it into archives. At that point, we'll also have to re-generate the base dumps because, as it turns out, they are currently not storing all of the relevant information.

At that point, we also should consider comparing against two dumps: the base dump, to make sure we haven't broken ABI with respect to the base, and the most recently-released version dump, to make sure that, in a later version, we haven't removed something that was added on an earlier (non-base) version, thereby breaking ABI not against the base, but against a version that was released into the wild.

Revision history for this message
James Henstridge (jamesh) wrote :

As discussed earlier, there is room for improvement but that will probably require a new version of abigail. This is obviously a big improvement over a-c-c, so lets merge it and improve it later.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'HACKING'
--- HACKING 2015-09-15 21:55:44 +0000
+++ HACKING 2016-02-15 06:03:52 +0000
@@ -293,13 +293,13 @@
293ABI compliance test293ABI compliance test
294-------------------294-------------------
295295
296The tests include an ABI compliance test (for Wily and later). To run it:296The tests include an ABI compliance test (for xenial and later). To run it:
297297
298 $ cd test/abi-compliance298 $ cd test/abi-compliance
299 $ make test299 $ make test
300300
301The test is also automatically run as part of the test suite.301The test is also automatically run as part of the test suite.
302It takes several minutes to run . If you don't want to wait during local builds,302It takes a while to run. If you don't want to wait during local builds,
303set the cmake "slowtests" option to OFF to skip the check.303set the cmake "slowtests" option to OFF to skip the check.
304304
305The baseline ABI files for the test are in test/abi-compliance/abi_dumps.305The baseline ABI files for the test are in test/abi-compliance/abi_dumps.
@@ -313,11 +313,8 @@
313Once all the packages are built, you can extract the ABI dump313Once all the packages are built, you can extract the ABI dump
314files and add them to the corresponding directory in the source tree.314files and add them to the corresponding directory in the source tree.
315315
316The abi-compliance-checker tool produces a report in316The abi compliance test produces a report in
317317libunity-scopes_<current-version>_abi-report.txt if anything unusual is detected.
318 test/abi-compliance/compat_reports/libunity-scopes.so/[version]_to_[version]/compat_report.html
319
320The report provides a nicely layed-out page with all the details.
321318
322Autopkg test suite319Autopkg test suite
323------------------320------------------
324321
=== modified file 'debian/VERSION'
--- debian/VERSION 2015-09-21 12:30:26 +0000
+++ debian/VERSION 2016-02-15 06:03:52 +0000
@@ -1,1 +1,1 @@
11.0.211.0.3
22
=== modified file 'debian/changelog'
--- debian/changelog 2015-12-18 11:42:03 +0000
+++ debian/changelog 2016-02-15 06:03:52 +0000
@@ -1,3 +1,27 @@
1unity-scopes-api (1.0.3+16.04.20160209-0ubuntu2) UNRELEASED; urgency=medium
2
3 [ Michi Henning ]
4 * Changed ABI compliance testing to use abigail.
5
6 -- Michi Henning <michi.henning@canonical.com> Mon, 15 Feb 2016 07:45:13 +1000
7
8unity-scopes-api (1.0.3+16.04.20160209-0ubuntu1) xenial; urgency=medium
9
10 [ Michi Henning ]
11 * Bumped micro version.
12
13 [ CI Train Bot ]
14 * No-change rebuild.
15
16 -- Rodney Dawes <ci-train-bot@canonical.com> Tue, 09 Feb 2016 15:15:15 +0000
17
18unity-scopes-api (1.0.3) UNRELEASED; urgency=medium
19
20 [ Michi Henning ]
21 * Changed ABI compliance check to use abigail instead of abi-compliance-checker.
22
23 -- Michi Henning <michi.henning@canonical.com> Tue, 09 Feb 2016 17:07:10 +1000
24
1unity-scopes-api (1.0.2+16.04.20151218.2-0ubuntu1) xenial; urgency=medium25unity-scopes-api (1.0.2+16.04.20151218.2-0ubuntu1) xenial; urgency=medium
226
3 [ Michi Henning ]27 [ Michi Henning ]
428
=== modified file 'debian/control.in'
--- debian/control.in 2015-11-13 04:05:00 +0000
+++ debian/control.in 2016-02-15 06:03:52 +0000
@@ -1,7 +1,8 @@
1Source: unity-scopes-api1Source: unity-scopes-api
2Priority: optional2Priority: optional
3Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>3Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
4Build-Depends: abi-compliance-checker,4Build-Depends: abigail-tools | libabigail-tools,
5 binutils,
5 capnproto,6 capnproto,
6 click-dev (>= 0.2.2),7 click-dev (>= 0.2.2),
7 cmake,8 cmake,
89
=== modified file 'test/CMakeLists.txt'
--- test/CMakeLists.txt 2015-09-09 07:37:01 +0000
+++ test/CMakeLists.txt 2016-02-15 06:03:52 +0000
@@ -5,5 +5,5 @@
55
6if(${slowtests})6if(${slowtests})
7 add_subdirectory(headers)7 add_subdirectory(headers)
8 add_subdirectory(abi-compliance) # Keep this test last because it's really slow.8 add_subdirectory(abi-compliance)
9endif()9endif()
1010
=== modified file 'test/abi-compliance/CMakeLists.txt'
--- test/abi-compliance/CMakeLists.txt 2015-09-09 07:37:01 +0000
+++ test/abi-compliance/CMakeLists.txt 2016-02-15 06:03:52 +0000
@@ -1,11 +1,11 @@
1configure_file(abi.xml.in ${CMAKE_CURRENT_BINARY_DIR}/abi.xml)
2configure_file(check-abi-compliance.sh.in ${CMAKE_CURRENT_BINARY_DIR}/check-abi-compliance.sh @ONLY)1configure_file(check-abi-compliance.sh.in ${CMAKE_CURRENT_BINARY_DIR}/check-abi-compliance.sh @ONLY)
3configure_file(gen-abi-dump.sh.in ${CMAKE_CURRENT_BINARY_DIR}/gen-abi-dump.sh @ONLY)2configure_file(gen-abi-dump.sh.in ${CMAKE_CURRENT_BINARY_DIR}/gen-abi-dump.sh @ONLY)
43
5set(abi_dump_cmd /bin/sh ${CMAKE_CURRENT_BINARY_DIR}/gen-abi-dump.sh)4set(abi_dump_cmd /bin/sh ${CMAKE_CURRENT_BINARY_DIR}/gen-abi-dump.sh)
6set(abi_check_cmd /bin/sh ${CMAKE_CURRENT_BINARY_DIR}/check-abi-compliance.sh)5set(abi_check_cmd /bin/sh ${CMAKE_CURRENT_BINARY_DIR}/check-abi-compliance.sh)
7set(abi_dump_file ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps/lib${UNITY_SCOPES_LIB}/lib${UNITY_SCOPES_LIB}_${UNITY_SCOPES_FULL_VERSION}.abi.tar.gz)6set(abi_dump_file ${CMAKE_CURRENT_BINARY_DIR}/lib${UNITY_SCOPES_LIB}_${UNITY_SCOPES_FULL_VERSION}.abi.xml)
8set(abi_report ${CMAKE_CURRENT_BINARY_DIR}/compat_reports/lib${UNITY_SCOPES_LIB}/lib${UNITY_SCOPES_LIB}/${UNITY_SCOPES_MAJOR_MINOR}.0_to_${UNITY_SCOPES_FULL_VERSION}/compat_report.html)7set(abi_baseline_dump ${CMAKE_CURRENT_BINARY_DIR}/lib${UNITY_SCOPES_LIB}_${UNITY_SCOPES_MAJOR}.0.0.abi.xml)
8set(abi_report ${CMAKE_CURRENT_BINARY_DIR}/lib${UNITY_SCOPES_LIB}_${UNITY_SCOPES_FULL_VERSION}_abi-report.txt)
99
10add_custom_command(10add_custom_command(
11 OUTPUT ${abi_dump_file}11 OUTPUT ${abi_dump_file}
@@ -15,10 +15,14 @@
15add_custom_target(gen-abi-dump DEPENDS ${abi_dump_file})15add_custom_target(gen-abi-dump DEPENDS ${abi_dump_file})
1616
17add_custom_command(17add_custom_command(
18 OUTPUT ${abi_report}18 OUTPUT run_always ${abi_report}
19 COMMAND ${abi_check_cmd}19 COMMAND ${abi_check_cmd}
20 DEPENDS gen-abi-dump)20 DEPENDS ${abi_dump_file} ${suppressions})
21set_source_files_properties(run_always
22 PROPERTIES SYMBOLIC true)
23set_directory_properties(PROPERTIES
24 ADDITIONAL_MAKE_CLEAN_FILES ${abi_baseline_dump})
2125
22add_custom_target(check-abi DEPENDS ${abi_report})26add_custom_target(check-abi DEPENDS run_always)
2327
24add_test(check-abi-compliance ${CMAKE_MAKE_PROGRAM} check-abi)28add_test(check-abi-compliance ${CMAKE_MAKE_PROGRAM} check-abi)
2529
=== removed file 'test/abi-compliance/abi.xml.in'
--- test/abi-compliance/abi.xml.in 2015-08-27 06:41:36 +0000
+++ test/abi-compliance/abi.xml.in 1970-01-01 00:00:00 +0000
@@ -1,57 +0,0 @@
1<version>
2@UNITY_SCOPES_MAJOR@.@UNITY_SCOPES_MINOR@.@UNITY_SCOPES_MICRO@
3</version>
4
5<headers>
6@CMAKE_SOURCE_DIR@/include
7@CMAKE_BINARY_DIR@/src
8@CMAKE_BINARY_DIR@/include/unity
9</headers>
10
11<!--
12We skip the internal include directories because we have separate tests
13that already ensure that no public header includes an internal one.
14-->
15<skip_include_paths>
16@CMAKE_BINARY_DIR@/include/unity/scopes/internal
17@CMAKE_BINARY_DIR@/include/unity/scopes/internal/lttng
18@CMAKE_BINARY_DIR@/include/unity/scopes/internal/smartscopes
19@CMAKE_BINARY_DIR@/include/unity/scopes/internal/zmq_middleware
20@CMAKE_BINARY_DIR@/include/unity/scopes/qt/internal
21@CMAKE_BINARY_DIR@/include/unity/scopes/utility/internal
22@CMAKE_SOURCE_DIR@/src/scopes/internal
23@CMAKE_SOURCE_DIR@/src/scopes/internal/lttng
24@CMAKE_SOURCE_DIR@/src/scopes/internal/smartscopes
25@CMAKE_SOURCE_DIR@/src/scopes/qt/internal
26@CMAKE_SOURCE_DIR@/src/scopes/utility/internal
27</skip_include_paths>
28
29<libs>
30@CMAKE_BINARY_DIR@/libunity-scopes.so
31</libs>
32
33<gcc_options>
34-std=c++11 -fPIC -D_ENABLE_QT_EXPERIMENTAL_ -DQT_NO_KEYWORDS
35</gcc_options>
36
37<skip_namespaces>
38unity::scopes::internal
39unity::scopes::qt::internal
40unity::scopes::utility::internal
41</skip_namespaces>
42
43<skip_headers>
44@CMAKE_BINARY_DIR@/include/unity/Makefile
45@CMAKE_BINARY_DIR@/include/unity/scopes/internal/lttng/Makefile
46@CMAKE_BINARY_DIR@/include/unity/scopes/internal/Makefile
47@CMAKE_BINARY_DIR@/include/unity/scopes/internal/smartscopes/Makefile
48@CMAKE_BINARY_DIR@/include/unity/scopes/internal/zmq_middleware/Makefile
49@CMAKE_BINARY_DIR@/include/unity/scopes/Makefile
50@CMAKE_BINARY_DIR@/include/unity/scopes/qt/internal/Makefile
51@CMAKE_BINARY_DIR@/include/unity/scopes/qt/Makefile
52@CMAKE_BINARY_DIR@/include/unity/scopes/testing/Makefile
53@CMAKE_BINARY_DIR@/include/unity/scopes/utility/internal/Makefile
54@CMAKE_BINARY_DIR@/include/unity/scopes/utility/Makefile
55@CMAKE_SOURCE_DIR@/include/unity/scopes/internal/lttng/SimpleTracepoint.h
56@CMAKE_SOURCE_DIR@/include/unity/scopes/internal/lttng/UnityScopes_tp.h
57</skip_headers>
580
=== removed file 'test/abi-compliance/abi_dumps/aarch64-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz'
59Binary files test/abi-compliance/abi_dumps/aarch64-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/aarch64-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ1Binary files test/abi-compliance/abi_dumps/aarch64-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/aarch64-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ
=== added file 'test/abi-compliance/abi_dumps/aarch64-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz'
60Binary files test/abi-compliance/abi_dumps/aarch64-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/aarch64-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ2Binary files test/abi-compliance/abi_dumps/aarch64-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/aarch64-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ
=== removed file 'test/abi-compliance/abi_dumps/arm-linux-gnueabihf/libunity-scopes_1.0.0.abi.tar.gz'
61Binary files test/abi-compliance/abi_dumps/arm-linux-gnueabihf/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/arm-linux-gnueabihf/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ3Binary files test/abi-compliance/abi_dumps/arm-linux-gnueabihf/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/arm-linux-gnueabihf/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ
=== added file 'test/abi-compliance/abi_dumps/arm-linux-gnueabihf/libunity-scopes_1.0.0.abi.xml.gz'
62Binary files test/abi-compliance/abi_dumps/arm-linux-gnueabihf/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/arm-linux-gnueabihf/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ4Binary files test/abi-compliance/abi_dumps/arm-linux-gnueabihf/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/arm-linux-gnueabihf/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ
=== removed file 'test/abi-compliance/abi_dumps/i386-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz'
63Binary files test/abi-compliance/abi_dumps/i386-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/i386-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ5Binary files test/abi-compliance/abi_dumps/i386-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/i386-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ
=== added file 'test/abi-compliance/abi_dumps/i386-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz'
64Binary files test/abi-compliance/abi_dumps/i386-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/i386-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ6Binary files test/abi-compliance/abi_dumps/i386-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/i386-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ
=== removed file 'test/abi-compliance/abi_dumps/powerpc-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz'
65Binary files test/abi-compliance/abi_dumps/powerpc-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/powerpc-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ7Binary files test/abi-compliance/abi_dumps/powerpc-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/powerpc-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ
=== added file 'test/abi-compliance/abi_dumps/powerpc-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz'
66Binary files test/abi-compliance/abi_dumps/powerpc-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/powerpc-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ8Binary files test/abi-compliance/abi_dumps/powerpc-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/powerpc-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ
=== removed file 'test/abi-compliance/abi_dumps/powerpc64le-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz'
67Binary files test/abi-compliance/abi_dumps/powerpc64le-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/powerpc64le-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ9Binary files test/abi-compliance/abi_dumps/powerpc64le-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/powerpc64le-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ
=== added file 'test/abi-compliance/abi_dumps/powerpc64le-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz'
68Binary files test/abi-compliance/abi_dumps/powerpc64le-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/powerpc64le-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ10Binary files test/abi-compliance/abi_dumps/powerpc64le-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/powerpc64le-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ
=== removed file 'test/abi-compliance/abi_dumps/x86_64-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz'
69Binary files test/abi-compliance/abi_dumps/x86_64-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/x86_64-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ11Binary files test/abi-compliance/abi_dumps/x86_64-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 2015-09-08 02:29:27 +0000 and test/abi-compliance/abi_dumps/x86_64-linux-gnu/libunity-scopes_1.0.0.abi.tar.gz 1970-01-01 00:00:00 +0000 differ
=== added file 'test/abi-compliance/abi_dumps/x86_64-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz'
70Binary files test/abi-compliance/abi_dumps/x86_64-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/x86_64-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ12Binary files test/abi-compliance/abi_dumps/x86_64-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 1970-01-01 00:00:00 +0000 and test/abi-compliance/abi_dumps/x86_64-linux-gnu/libunity-scopes_1.0.0.abi.xml.gz 2016-02-15 06:03:52 +0000 differ
=== modified file 'test/abi-compliance/check-abi-compliance.sh.in'
--- test/abi-compliance/check-abi-compliance.sh.in 2015-09-15 21:59:25 +0000
+++ test/abi-compliance/check-abi-compliance.sh.in 2016-02-15 06:03:52 +0000
@@ -20,10 +20,11 @@
2020
21# Script to check whether the ABI is still intact.21# Script to check whether the ABI is still intact.
22#22#
23# The base ABI (for version <x>.<y>.0) is kept in libunity-scopes_<x>.<y>.0.abi.tar.gz.23# The base ABI (for version <x>.<y>.0) is kept in libunity-scopes_<x>.<y>.0.abi.xml.gz.
24# If the micro version is non-zero, we run abi-compliance-checker to compare the two versions.24# If the micro version is non-zero, we run abidiff to compare the two versions.
25# If there are any complaints, we print an error message ane return non-zero status.25# If there are any complaints, we print an error message ane return non-zero status.
2626
27set -x
27progname=$(basename $0)28progname=$(basename $0)
2829
29distro=$(lsb_release -c -s)30distro=$(lsb_release -c -s)
@@ -32,26 +33,63 @@
32 exit 033 exit 0
33}34}
3435
36[ @UNITY_SCOPES_MICRO@ -eq 0 ] && exit 0
37
35libname=lib@UNITY_SCOPES_LIB@38libname=lib@UNITY_SCOPES_LIB@
3639base_abi_dir=@CMAKE_CURRENT_SOURCE_DIR@/abi_dumps/@CMAKE_LIBRARY_ARCHITECTURE@
37base_abi=@CMAKE_CURRENT_SOURCE_DIR@/abi_dumps/@CMAKE_LIBRARY_ARCHITECTURE@/${libname}_@UNITY_SCOPES_MAJOR_MINOR@.0.abi.tar.gz40base_abi=${libname}_@UNITY_SCOPES_MAJOR_MINOR@.0.abi.xml
38cur_abi=@CMAKE_CURRENT_BINARY_DIR@/abi_dumps/${libname}/${libname}_@UNITY_SCOPES_FULL_VERSION@.abi.tar.gz41
42gunzip -c ${base_abi_dir}/${base_abi}.gz >${base_abi}
43
44cur_abi=${libname}_@UNITY_SCOPES_FULL_VERSION@.abi.xml
45report=${libname}_@UNITY_SCOPES_FULL_VERSION@_abi-report.txt
46
47# If the current lib doesn't contain debug info, we can't run the test.
48# TODO: See https://sourceware.org/bugzilla/show_bug.cgi?id=19621
49info_file=$(mktemp)
50readelf --debug-dump=info @CMAKE_BINARY_DIR@/${libname}.so >$info_file
51[ $? -ne 0 ] && exit 1
52[ -s $info_file ]
53no_debug_info=$?
54rm -f $info_file
55[ $no_debug_info -eq 1 ] && {
56 echo "${progname}: Skipping ABI test because ${libname}.so was compiled without -g"
57 exit 0
58}
3959
40# Compare against the base ABI.60# Compare against the base ABI.
41abi-compliance-checker -lib ${libname} -old $base_abi -new $cur_abi61abidiff --no-unreferenced-symbols --suppressions @CMAKE_CURRENT_SOURCE_DIR@/suppressions \
4262 ${base_abi} ${cur_abi} >${report} 2>&1
43status=$?63status=$?
44report=@CMAKE_CURRENT_BINARY_DIR@/compat_reports/${libname}/1.0.0_to_@UNITY_SCOPES_FULL_VERSION@/compat_report.html64
45[ -e $report ] && {65# TODO: Exit status test is not reliable with 1.0.rc2 (https://sourceware.org/bugzilla/show_bug.cgi?id=19596).
46 echo "${progname}: Compatibility report generated to $report"66# We instead rely on the report size for the time being. When suppressions are used, and there are
47}67# no problems, the report still contains three lines of summary, so we fail if there are more than
4868# three lines.
49[ $status -ne 0 ] && {69num_lines=$(wc -l <${report})
50 [ $status -eq 1 ] && {70[ $num_lines -gt 3 ] && {
51 echo "${progname}: ERROR: Incompatible ABI!" >&271 echo "${progname}: ERROR: Incompatible ABI!" >&2
52 }72 cat ${report} >&2
53 echo "${progname}: ERROR: abi-compliance-checker returned exit status $status" >&273 exit 8
54 exit 174}
55}75exit $status # TODO
5676
57exit 077# Incompatible changes found.
78[ $status -ge 8 ] && {
79 echo "${progname}: ERROR: Incompatible ABI!" >&2
80 cat ${report} >&2
81 exit $status
82}
83
84# Possibly incompatible changes found.
85[ $status -ge 4 ] && {
86 echo "${progname}: ABI has possibly incompatible changes, see $report for details."
87 exit $status
88}
89
90# All went fine.
91[ $status -eq 0 ] && exit 0
92
93# Some other error
94echo "${progname}: Unexpected error, see $report for details." >&2
95exit $status
5896
=== modified file 'test/abi-compliance/gen-abi-dump.sh.in'
--- test/abi-compliance/gen-abi-dump.sh.in 2015-09-10 00:39:52 +0000
+++ test/abi-compliance/gen-abi-dump.sh.in 2016-02-15 06:03:52 +0000
@@ -21,7 +21,7 @@
21# Script to dump the current ABI.21# Script to dump the current ABI.
2222
23libname=lib@UNITY_SCOPES_LIB@23libname=lib@UNITY_SCOPES_LIB@
24cur_abi=@CMAKE_CURRENT_BINARY_DIR@/abi_dumps/${libname}/${libname}_@UNITY_SCOPES_FULL_VERSION@.abi.tar.gz24cur_abi=@CMAKE_CURRENT_BINARY_DIR@/${libname}_@UNITY_SCOPES_FULL_VERSION@.abi.xml
2525
26distro=$(lsb_release -c -s)26distro=$(lsb_release -c -s)
27[ "$distro" = "vivid" ] && {27[ "$distro" = "vivid" ] && {
@@ -30,6 +30,6 @@
30}30}
3131
32# Dump the current ABI.32# Dump the current ABI.
33abi-compliance-checker -lib ${libname} -dump @CMAKE_CURRENT_BINARY_DIR@/abi.xml33abidw --out-file ${cur_abi} @CMAKE_BINARY_DIR@/${libname}.so
3434
35exit $?35exit $?
3636
=== added file 'test/abi-compliance/suppressions'
--- test/abi-compliance/suppressions 1970-01-01 00:00:00 +0000
+++ test/abi-compliance/suppressions 2016-02-15 06:03:52 +0000
@@ -0,0 +1,21 @@
1# Suppressions for template functions that are instantiated due to new
2# types that were added since the baseline.
3
4# TODO: The allows_other_aliases is currently needed due to a bug in abigail 1.0.rc2.
5# One a newer version becomes available, they can be removed.
6# https://sourceware.org/bugzilla/show_bug.cgi?id=19619
7
8[suppress_function]
9 name_regexp = boost::.*
10 change_kind = added-function
11 allow_other_aliases = false
12
13[suppress_function]
14 name_regexp = std::.*
15 change_kind = added-function
16 allow_other_aliases = false
17
18[suppress_function]
19 name_regexp = unity::scopes::testing::.*
20 change_kind = added-function
21 allow_other_aliases = false

Subscribers

People subscribed via source and target branches

to all changes: