Better propagation of suppressed-ness to function types
authorDodji Seketeli <dodji@redhat.com>
Wed, 4 Sep 2019 09:10:31 +0000 (11:10 +0200)
committerDodji Seketeli <dodji@redhat.com>
Mon, 30 Sep 2019 12:56:41 +0000 (14:56 +0200)
commitbdd927f66395e9a4a9c3febf86304a1fa71cf198
treecf674c9f4a3b53fc4c91da5c6432ca0c78edcbab
parente528d5b8ac90ae9983c674ea784e3c95b7db6fc7
Better propagation of suppressed-ness to function types

In the comparison engine, when a sub-type of a function type (say, a
parameter type size change) has been suppressed, this suppression is
not necessarily well propagated to the function carrying the function
type, because the parameter type size, for instance, is considered as
a type local change to that function; and we generally don't propagate
suppression to a non-suppressed parent diff node that already carries
a local change.

This leads to an empty change report for the function we are looking
at because the only sub-type change has been suppressed.

This patch properly propagates the suppressed-ness in that case, so
that the parent function diff node is suppressed as well.

* src/abg-comparison.cc
(suppression_categorization_visitor::visit_end): Propagate
suppression-ness from suppressed function type diff node to its
parent function node if the latter doesn't have any local non-type
change.
* tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-report-1.txt:
New test reference output.
* tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-suppr-1.txt:
New test input suppression file.
* tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-v{0,1}.cc:
Source code of input binary file.
* tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-v{0,1}.o:
Input binary files.
* tests/data/Makefile.am: Add the new test input files above to
source distribution.
* tests/test-diff-suppr.cc (in_out_specs): Add the test input to
test harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-comparison.cc
tests/data/Makefile.am
tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-report-1.txt [new file with mode: 0644]
tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-suppr-1.txt [new file with mode: 0644]
tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-v0.cc [new file with mode: 0644]
tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-v0.o [new file with mode: 0644]
tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-v1.cc [new file with mode: 0644]
tests/data/test-diff-suppr/test43-suppr-direct-fn-subtype-v1.o [new file with mode: 0644]
tests/test-diff-suppr.cc