public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH to review] Bug 27569 - abidiff misses a function parameter addition
Date: Thu, 25 Mar 2021 12:18:38 +0100	[thread overview]
Message-ID: <87k0pvv5v5.fsf@redhat.com> (raw)

[-- 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

             reply	other threads:[~2021-03-25 11:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 11:18 Dodji Seketeli [this message]
2021-03-29 11:13 ` [PATCH, applied] " Dodji Seketeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0pvv5v5.fsf@redhat.com \
    --to=dodji@redhat.com \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).