public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Bug 25977 - runtestabidiffexit regression on EL7
@ 2020-05-12 15:50 Dodji Seketeli
  0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2020-05-12 15:50 UTC (permalink / raw)
  To: libabigail

Hello,

When running runtestabidiffexit I am getting this failure:

$ ./build/tests/runtestabidiffexit
--- /home/dodji/git/libabigail/master/tests/data/test-abidiff-exit/test-leaf-cxx-members-report.txt	2020-04-16 11:19:27.615339665 +0200
+++ /home/dodji/git/libabigail/master/build/tests/output/test-abidiff-exit/test-leaf-cxx-members-report.txt	2020-05-12 16:15:34.316685604 +0200
@@ -1,6 +1,6 @@
-Leaf changes summary: 4 artifacts changed
+Leaf changes summary: 3 artifacts changed (1 filtered out)
 Changed leaf types summary: 1 leaf type changed
-Removed/Changed/Added functions summary: 1 Removed, 1 Changed, 1 Added function
+Removed/Changed/Added functions summary: 1 Removed, 0 Changed (1 filtered out), 1 Added function
 Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

 1 Removed function:
@@ -13,13 +13,6 @@
   [A] 'method virtual long int ops::added_fn()'    {_ZN3ops8added_fnEv}
     note that this adds a new entry to the vtable of struct ops

-1 function with some sub-type change:
-
-  [C] 'method virtual int ops::changed_fn()' at test-leaf-cxx-members-v1.cc:5:1 has some sub-type changes:
-    return type changed:
-      type name changed from 'int' to 'long int'
-      type size changed from 32 to 64 (in bits)
-
 'struct ops at test-leaf-cxx-members-v0.cc:2:1' changed:
   type size changed from 128 to 192 (in bits)
   1 member function deletion:
@@ -27,10 +20,6 @@
   1 member function insertion:
     'method virtual long int ops::added_fn()' at test-leaf-cxx-members-v1.cc:11:1, virtual at voffset 1/1    {_ZN3ops8added_fnEv}
   there are member function changes:
-    'method virtual int ops::changed_fn()' has some changes:
-      return type changed:
-        type name changed from 'int' to 'long int'
-        type size changed from 32 to 64 (in bits)
   1 data member deletion:
     'int ops::deleted_var', at offset 96 (in bits) at test-leaf-cxx-members-v0.cc:5:1
   1 data member insertion:
$

This is because we wrongly consider the canonical diff node for the
change on the type of function "int ops::changed_fn()" as being
suppressed.  This is because of an old thinko in the suppression
categorization and propagation pass for local types changes to
functions.  Oops.

Fixed thus and applied to master.

	* abg-comparison.cc:
	(suppression_categorization_visitor::visit_end): Don't suppress
	the entire class of equivalence of a function diff node if that
	function diff node itself was not suppressed.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 src/abg-comparison.cc | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
index 399c4b9..57cc6c2 100644
--- a/src/abg-comparison.cc
+++ b/src/abg-comparison.cc
@@ -11580,12 +11580,14 @@ struct suppression_categorization_visitor : public diff_node_visitor
 	      // the user asked and suppress the function altogether,
 	      if (function_type_diff_sptr fn_type_diff = fn_diff->type_diff())
 		if (fn_type_diff->is_suppressed())
-		  d->add_to_category(SUPPRESSED_CATEGORY);
-	    // If a node was suppressed, all the other nodes of its class
-	    // of equivalence are suppressed too.
-	    diff *canonical_diff = d->get_canonical_diff();
-	    if (canonical_diff != d)
-	      canonical_diff->add_to_category(SUPPRESSED_CATEGORY);
+		  {
+		    d->add_to_category(SUPPRESSED_CATEGORY);
+		    // If a node was suppressed, all the other nodes
+		    // of its class of equivalence are suppressed too.
+		    diff *canonical_diff = d->get_canonical_diff();
+		    if (canonical_diff != d)
+		      canonical_diff->add_to_category(SUPPRESSED_CATEGORY);
+		  }
 	  }
       }
   }
-- 
1.8.3.1


-- 
		Dodji

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-12 15:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 15:50 [PATCH] Bug 25977 - runtestabidiffexit regression on EL7 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).