[PATCH 2/2 v2] [abidiff] Add more leaf change reporting.

Dodji Seketeli dodji@seketeli.org
Fri Mar 13 17:02:18 GMT 2020


Giuliano Procida <gprocida@google.com> a écrit:

> The leaf-changes-only reporting path does not report on all the same
> kinds of differences as the default reporting path does, such as
> reporting about changes to variables, even though they can be
> considered leaf changs.
>
>     - The addition or removal of any symbol affects the ABI and is
>       clearly a leaf change.
>     - A change to a variable's declaration may be local rather than
>       caused by a type change elsewhere.
>
> This patch adds these missing pieces and reorders some of the existing
> leaf reporting, bringing the default and leaf corpus_diff functions
> closer to the point where they can be trivially merged or refactored.
>
> This patch also corrects an error in reporting the total number of
> leaf changes.
>
> 	* src/abg-comparison.cc (emit_diff_stats): Exclude non-leaf
> 	changes to variables from the reported total of leaf changes.
> 	* src/abg-default-reporter.cc (report): In the corpus_diff
> 	override, move some code and comments for clarity.
> 	* src/abg-leaf-reporter.cc (report): In the corpus_diff
> 	override, additionally report removed/added/changed variables
> 	and removed/added symbols absent from debug info.
> 	* tests/data/Makefile.am: Add new test case files.
> 	* tests/data/test-abidiff-exit/test-leaf0-report.txt: Update
> 	to include reporting of variable diff (change of type).
> 	* tests/data/test-abidiff-exit/test-leaf1-report.txt: New test
> 	case with added/removed variables/functions and changed
> 	variables (both local and non-local type changes).
> 	* tests/data/test-abidiff-exit/test-leaf1-v0.cc: Ditto.
> 	* tests/data/test-abidiff-exit/test-leaf1-v0.o: Ditto.
> 	* tests/data/test-abidiff-exit/test-leaf1-v1.cc: Ditto.
> 	* tests/data/test-abidiff-exit/test-leaf1-v1.o: Ditto.
> 	* tests/test-abidiff-exit.cc: Run new test case. Supply
> 	--redundant otherwise the test isn't meaningful.

This looks OK to me.  I have just updated the manual of the abi{pkg}diff
tools to say that --leaf-changes-only implies --redudant, just as you
did in the help string of these tools.

The patch was applied to master.

Thanks!

-- 
		Dodji


More information about the Libabigail mailing list