public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH to review] Bug 27569 - abidiff misses a function parameter addition
@ 2021-03-25 11:18 Dodji Seketeli
  2021-03-29 11:13 ` [PATCH, applied] " Dodji Seketeli
  0 siblings, 1 reply; 2+ messages in thread
From: Dodji Seketeli @ 2021-03-25 11:18 UTC (permalink / raw)
  To: libabigail

[-- Attachment #1: Type: text/plain, Size: 2804 bytes --]

Hello,

Adding or deleting function parameters are changes that have not yet
be categorized in the comparison engine.  As a result, those changes
are considered harmless and are filtered out by default.  Oops.

This patch categorizes function addition and removal as
FN_PARM_ADD_REMOVE_CHANGE_CATEGORY, which is a new category being
introduced.  Changes in this category are considered harmful and are
thus always reported by default.

The patch is too big so it's attached to this message, gzip'ed.

Please find below its ChangeLog, however.

	* include/abg-comparison.h (enum diff_category): Add a new
	FN_PARM_ADD_REMOVE_CHANGE_CATEGORY enumerator and adjust the
	following enumerator values.  Update the EVERYTHING_CATEGORY
	accordingly.
	(function_type_diff::{sorted_deleted_parms, sorted_added_parms}):
	Add new member functions.
	* src/abg-comparison.cc
	(function_type_diff::{sorted_deleted_parms, sorted_added_parms}):
	Define new accessors.
	(get_default_harmful_categories_bitmap):
	Consider changes of the category
	FN_PARM_ADD_REMOVE_CHANGE_CATEGORY as harmful.
	(operator<<(ostream& o, diff_category c)): Support the new
	FN_PARM_ADD_REMOVE_CHANGE_CATEGORY while serializing a category
	bitmap.
	* src/abg-comp-filter.cc
	(has_added_or_removed_function_parameters): Define new static
	function.
	(categorize_harmful_diff_node): Categorize diff nodes representing
	function parameter addition or removal as
	FN_PARM_ADD_REMOVE_CHANGE_CATEGORY.
	* tests/data/test-diff-filter/test-PR27569-report-0.txt: New test
	reference output.
	* tests/data/test-diff-filter/test-PR27569-v{0,1}.abi: New test inputs.
	* tests/data/Makefile.am: Add the new test inputs to the source
	distribution.
	* tests/test-diff-filter.cc (in_out_specs): Add the new test
	inputs to this test harness.
	* tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
	Adjust.
	* tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt:
	Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 include/abg-comparison.h                      |    17 +-
 src/abg-comp-filter.cc                        |    30 +
 src/abg-comparison.cc                         |    25 +-
 tests/data/Makefile.am                        |     3 +
 .../test-PR27569-report-0.txt                 |     8 +
 .../data/test-diff-filter/test-PR27569-v0.abi | 83837 +++++++++++++++
 .../data/test-diff-filter/test-PR27569-v1.abi | 83855 ++++++++++++++++
 .../test31-pr18535-libstdc++-report-0.txt     |    46 +-
 .../test31-pr18535-libstdc++-report-1.txt     |    46 +-
 tests/test-diff-filter.cc                     |     7 +
 10 files changed, 167866 insertions(+), 8 deletions(-)
 create mode 100644 tests/data/test-diff-filter/test-PR27569-report-0.txt
 create mode 100644 tests/data/test-diff-filter/test-PR27569-v0.abi


[-- Attachment #2: gzip'ed patch --]
[-- Type: application/gzip, Size: 1074471 bytes --]

[-- Attachment #3: Type: text/plain, Size: 22 bytes --]


Cheers,

-- 
		Dodji

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH, applied] Bug 27569 - abidiff misses a function parameter addition
  2021-03-25 11:18 [PATCH to review] Bug 27569 - abidiff misses a function parameter addition Dodji Seketeli
@ 2021-03-29 11:13 ` Dodji Seketeli
  0 siblings, 0 replies; 2+ messages in thread
From: Dodji Seketeli @ 2021-03-29 11:13 UTC (permalink / raw)
  To: Dodji Seketeli via Libabigail; +Cc: Dodji Seketeli

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

Dodji Seketeli via Libabigail <libabigail@sourceware.org> a écrit:

[...]

> Signed-off-by: Dodji Seketeli <dodji@redhat.com>

I've applied this to master with some light adjustments.

The modified patch is attached, gzipped.


[-- Attachment #2: zipped applied patch --]
[-- Type: application/gzip, Size: 1076154 bytes --]

[-- Attachment #3: Type: text/plain, Size: 22 bytes --]


Cheers,

-- 
		Dodji

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-29 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25 11:18 [PATCH to review] Bug 27569 - abidiff misses a function parameter addition Dodji Seketeli
2021-03-29 11:13 ` [PATCH, applied] " Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).