]> sourceware.org Git - libabigail.git/commit
comparison: Better sort function difference report
authorDodji Seketeli <dodji@redhat.com>
Mon, 4 Mar 2024 09:44:16 +0000 (10:44 +0100)
committerDodji Seketeli <dodji@redhat.com>
Mon, 4 Mar 2024 12:34:24 +0000 (13:34 +0100)
commit06fa2fd968bb895d21bee099018904a5292c6ff7
treeaf02f863c90c9584931faea5498f52e2a0a6b307
parentdd34ee8687d74c1204875f3746ee063f9408aba8
comparison: Better sort function difference report

Looking at the result of builds on various platforms, it appears that
the order of the method change reports in the
test29-vtable-changes-report-0.txt of runtestdiffdwarf was not stable
across all platforms. debian-armhf was exhibiting this change in
output, for instance:

    --- /var/lib/buildbot/workers/wildebeest/libabigail-try-debian-armhf/build/tests/data/test-diff-dwarf/test29-vtable-changes-report-0.txt
2024-03-04 08:56:42.307366590 +0000
    +++ /var/lib/buildbot/workers/wildebeest/libabigail-try-debian-armhf/build/tests/output/test-diff-dwarf/test29-vtable-changes-report-0.txt
2024-03-04 09:20:22.146334907 +0000
    @@ -19,13 +19,13 @@
 implicit parameter 0 of type 'S* const' has sub-type
changes:
   in unqualified underlying type 'S*':
     pointed to type 'struct S' changed, as being reported
    +          'method virtual S::~S(int)' has some sub-type changes:
    +            implicit parameter 0 of type 'S*' has sub-type changes:
    +              pointed to type 'struct S' changed, as being reported
       'method virtual S::~S()' has some sub-type changes:
 implicit parameter 0 of type 'S* const' has sub-type
changes:
   in unqualified underlying type 'S*':
     pointed to type 'struct S' changed, as being reported
    -          'method virtual S::~S(int)' has some sub-type changes:
    -            implicit parameter 0 of type 'S*' has sub-type changes:
    -              pointed to type 'struct S' changed, as being reported
       'method virtual void S::fn0()' has some sub-type changes:
 implicit parameter 0 of type 'S*' has sub-type changes:
   pointed to type 'struct S' changed, as being reported

Better handling the sorting of function changes should hopefully fix
this issue.

* src/abg-comparison-priv.h (is_less_than): Declare new helper
function.
(function_decl_diff_comp::operator(const function_decl_diff&,
                                   const function_decl_diff&)):
Use it here.
(virtual_member_function_diff_comp::operator(const function_decl_diff&,
                                             const function_decl_diff&)):
Likewise.
* tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
* tests/data/test-diff-dwarf/test29-vtable-changes-report-0.txt:
Adjust.
* tests/data/test-diff-dwarf/test30-vtable-changes-report-0.txt:
Adjust.
* tests/data/test-diff-dwarf/test31-vtable-changes-report-0.txt:
Adjust.
* tests/data/test-diff-dwarf/test41-PR20476-hidden-report-0.txt:
Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-comparison-priv.h
src/abg-comparison.cc
tests/data/test-abidiff/test-PR18791-report0.txt
tests/data/test-diff-dwarf/test29-vtable-changes-report-0.txt
tests/data/test-diff-dwarf/test30-vtable-changes-report-0.txt
tests/data/test-diff-dwarf/test31-vtable-changes-report-0.txt
tests/data/test-diff-dwarf/test41-PR20476-hidden-report-0.txt
This page took 0.033523 seconds and 5 git commands to generate.