[1/2,abidiff] Fix spurious new lines after diff sections.

Message ID 20200311103524.258203-1-gprocida@google.com
State Committed
Headers
Series [1/2,abidiff] Fix spurious new lines after diff sections. |

Commit Message

Giuliano Procida March 11, 2020, 10:35 a.m. UTC
  The top-level corpus diff routines in abidiff have varied ways of
tracking whether or not to emit a new line after each section. Reuse
of state variables (which aren't always cleared) between sections
means that spurious new lines are sometimes output.

This patch replaces this new line logic in the functions with the same
simple pattern of using a local boolean state variable.

	* src/abg-default-reporter.cc (report): In the corpus_diff
	overload, just use a local boolean emitted state variable
	within each section to determine whether or not to follow the
	section with an extra new line.
	* src/abg-leaf-reporter.cc: Ditto.
	* tests/data/test-*/*report*.txt: Remove unwanted new lines
	from 27 files.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 src/abg-default-reporter.cc                   | 76 ++++++++++---------
 src/abg-leaf-reporter.cc                      | 31 ++++----
 .../test1-fn-removed-report-0.txt             |  1 -
 .../test3-fn-removed-report-0.txt             |  1 -
 .../test2-filtered-removed-fns-report0.txt    |  1 -
 .../test-abidiff/test-PR18791-report0.txt     |  1 -
 .../test31-vtable-changes-report-0.txt        |  1 -
 .../test32-fnptr-changes-report-0.txt         |  1 -
 .../test33-fnref-changes-report-0.txt         |  1 -
 .../test42-PR21296-clanggcc-report0.txt       |  1 -
 tests/data/test-diff-filter/test10-report.txt |  1 -
 .../data/test-diff-filter/test41-report-0.txt |  1 -
 ...4--libcdio-0.94-2.fc26.x86_64-report.1.txt |  1 -
 ...-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt |  1 -
 ...l7.x86_64-0.12.8-1.el7.x86_64-report-0.txt |  1 -
 ...l7.x86_64-0.12.8-1.el7.x86_64-report-1.txt |  1 -
 ...l7.x86_64-0.12.8-1.el7.x86_64-report-2.txt |  1 -
 ...bb-4.3-3.20141204.fc23.x86_64-report-0.txt |  2 -
 ...bb-4.3-3.20141204.fc23.x86_64-report-1.txt |  2 -
 .../data/test-diff-pkg/test-rpm-report-0.txt  |  1 -
 .../data/test-diff-pkg/test-rpm-report-5.txt  |  1 -
 .../test16-suppr-removed-fn-report-0.txt      |  1 -
 .../test16-suppr-removed-fn-report-3.txt      |  1 -
 .../test19-suppr-added-fn-sym-report-1.txt    |  1 -
 .../test19-suppr-added-fn-sym-report-2.txt    |  1 -
 .../test19-suppr-added-fn-sym-report-4.txt    |  1 -
 .../test21-suppr-added-var-sym-report-5.txt   |  1 -
 .../test22-suppr-removed-var-sym-report-2.txt |  1 -
 .../data/test-diff-suppr/test30-report-0.txt  |  1 -
 29 files changed, 52 insertions(+), 84 deletions(-)
  

Comments

Dodji Seketeli March 12, 2020, 1:03 p.m. UTC | #1
Hello Giuliano,

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

> The top-level corpus diff routines in abidiff have varied ways of
> tracking whether or not to emit a new line after each section. Reuse
> of state variables (which aren't always cleared) between sections
> means that spurious new lines are sometimes output.
>
> This patch replaces this new line logic in the functions with the same
> simple pattern of using a local boolean state variable.
>
> 	* src/abg-default-reporter.cc (report): In the corpus_diff
> 	overload, just use a local boolean emitted state variable
> 	within each section to determine whether or not to follow the
> 	section with an extra new line.
> 	* src/abg-leaf-reporter.cc: Ditto.
> 	* tests/data/test-*/*report*.txt: Remove unwanted new lines
> 	from 27 files.

This looks good to me and I have applied to master.

Thanks!
  

Patch

diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc
index aaf083b3..2ac93d41 100644
--- a/src/abg-default-reporter.cc
+++ b/src/abg-default-reporter.cc
@@ -224,7 +224,7 @@  default_reporter::report_local_typedef_changes(const typedef_diff &d,
     {
       out << indent << "typedef name changed from "
 	  << f->get_qualified_name()
-          << " to "
+	  << " to "
 	  << s->get_qualified_name();
       report_loc_info(s, *d.context(), out);
       out << "\n";
@@ -788,8 +788,8 @@  default_reporter::report(const scope_diff& d, ostream& out,
 
       out << indent << "  '"
 	  << (*dif)->first_subject()->get_pretty_representation()
-          << "' was changed to '"
-          << (*dif)->second_subject()->get_pretty_representation() << "'";
+	  << "' was changed to '"
+	  << (*dif)->second_subject()->get_pretty_representation() << "'";
       report_loc_info((*dif)->second_subject(), *d.context(), out);
       out << ":\n";
 
@@ -1761,7 +1761,7 @@  void
 default_reporter::report(const corpus_diff& d, ostream& out,
 			 const string& indent) const
 {
-  size_t total = 0, removed = 0, added = 0;
+  size_t total = 0;
   const corpus_diff::diff_stats &s =
     const_cast<corpus_diff&>(d).
     apply_filters_and_suppressions_before_reporting();
@@ -1797,6 +1797,7 @@  default_reporter::report(const corpus_diff& d, ostream& out,
       else if (s.net_num_func_removed() > 1)
 	out << indent << s.net_num_func_removed() << " Removed functions:\n\n";
 
+      bool emitted = false;
       vector<function_decl*>sorted_deleted_fns;
       sort_string_function_ptr_map(d.priv_->deleted_fns_, sorted_deleted_fns);
       for (vector<function_decl*>::const_iterator i =
@@ -1830,9 +1831,9 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 		  << c->get_pretty_representation()
 		  << "\n";
 	    }
-	  ++removed;
+	  emitted = true;;
 	}
-      if (removed)
+      if (emitted)
 	out << "\n";
     }
 
@@ -1843,6 +1844,7 @@  default_reporter::report(const corpus_diff& d, ostream& out,
       else if (s.net_num_func_added() > 1)
 	out << indent << s.net_num_func_added()
 	    << " Added functions:\n\n";
+      bool emitted = false;
       vector<function_decl*> sorted_added_fns;
       sort_string_function_ptr_map(d.priv_->added_fns_, sorted_added_fns);
       for (vector<function_decl*>::const_iterator i = sorted_added_fns.begin();
@@ -1879,13 +1881,10 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 		  << c->get_pretty_representation()
 		  << "\n";
 	    }
-	  ++added;
-	}
-      if (added)
-	{
-	  out << "\n";
-	  added = false;
+	  emitted = true;
 	}
+      if (emitted)
+	out << "\n";
     }
 
   if (ctxt->show_changed_fns())
@@ -1963,14 +1962,11 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 		}
 	      diff->report(out, indent + "    ");
 	      out << "\n";
-	      emitted |= true;
+	      emitted = true;
 	    }
 	}
       if (emitted)
-	{
-	  out << "\n";
-	  emitted = false;
-	}
+	out << "\n";
     }
 
   // Report added/removed/changed variables.
@@ -1985,6 +1981,7 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	out << indent << s.net_num_vars_removed()
 	    << " Removed variables:\n\n";
       string n;
+      bool emitted = false;
       vector<var_decl*> sorted_deleted_vars;
       sort_string_var_ptr_map(d.priv_->deleted_vars_, sorted_deleted_vars);
       for (vector<var_decl*>::const_iterator i =
@@ -2012,13 +2009,10 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	      out << "}";
 	    }
 	  out << "\n";
-	  ++removed;
+	  emitted = true;
 	}
-      if (removed)
-	{
+      if (emitted)
 	  out << "\n";
-	  removed = 0;
-	}
     }
 
   if (ctxt->show_added_vars())
@@ -2029,6 +2023,7 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	out << indent << s.net_num_vars_added()
 	    << " Added variables:\n\n";
       string n;
+      bool emitted = false;
       vector<var_decl*> sorted_added_vars;
       sort_string_var_ptr_map(d.priv_->added_vars_, sorted_added_vars);
       for (vector<var_decl*>::const_iterator i =
@@ -2054,13 +2049,10 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	      out << "}";
 	    }
 	  out << "\n";
-	  ++added;
-	}
-      if (added)
-	{
-	  out << "\n";
-	  added = 0;
+	  emitted = true;
 	}
+      if (emitted)
+	out << "\n";
     }
 
   if (ctxt->show_changed_vars())
@@ -2074,6 +2066,7 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	    << " Changed variables:\n\n";
       string n1, n2;
 
+      bool emitted = false;
       for (var_diff_sptrs_type::const_iterator i =
 	     d.priv_->sorted_changed_vars_.begin();
 	   i != d.priv_->sorted_changed_vars_.end();
@@ -2097,8 +2090,9 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	  out << ":\n";
 	  diff->report(out, indent + "    ");
 	  out << "\n";
+	  emitted = true;
 	}
-      if (num_changed)
+      if (emitted)
 	out << "\n";
     }
 
@@ -2114,6 +2108,7 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	    << s.net_num_removed_func_syms()
 	    << " Removed function symbols not referenced by debug info:\n\n";
 
+      bool emitted = false;
       vector<elf_symbol_sptr> sorted_deleted_unrefed_fn_syms;
       sort_string_elf_symbol_map(d.priv_->deleted_unrefed_fn_syms_,
 				 sorted_deleted_unrefed_fn_syms);
@@ -2132,9 +2127,10 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	  show_linkage_name_and_aliases(out, "", **i,
 					d.first_corpus()->get_fun_symbol_map());
 	  out << "\n";
+	  emitted = true;
 	}
-      if (sorted_deleted_unrefed_fn_syms.size())
-	out << '\n';
+      if (emitted)
+	out << "\n";
     }
 
   // Report added function symbols not referenced by any debug info.
@@ -2150,6 +2146,7 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	    << s.net_num_added_func_syms()
 	    << " Added function symbols not referenced by debug info:\n\n";
 
+      bool emitted = false;
       vector<elf_symbol_sptr> sorted_added_unrefed_fn_syms;
       sort_string_elf_symbol_map(d.priv_->added_unrefed_fn_syms_,
 				 sorted_added_unrefed_fn_syms);
@@ -2168,9 +2165,10 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 					**i,
 					d.second_corpus()->get_fun_symbol_map());
 	  out << "\n";
+	  emitted = true;
 	}
-      if (sorted_added_unrefed_fn_syms.size())
-	out << '\n';
+      if (emitted)
+	out << "\n";
     }
 
   // Report removed variable symbols not referenced by any debug info.
@@ -2185,6 +2183,7 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	    << s.net_num_removed_var_syms()
 	    << " Removed variable symbols not referenced by debug info:\n\n";
 
+      bool emitted = false;
       vector<elf_symbol_sptr> sorted_deleted_unrefed_var_syms;
       sort_string_elf_symbol_map(d.priv_->deleted_unrefed_var_syms_,
 				 sorted_deleted_unrefed_var_syms);
@@ -2205,9 +2204,10 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	     d.first_corpus()->get_fun_symbol_map());
 
 	  out << "\n";
+	  emitted = true;
 	}
-      if (sorted_deleted_unrefed_var_syms.size())
-	out << '\n';
+      if (emitted)
+	out << "\n";
     }
 
   // Report added variable symbols not referenced by any debug info.
@@ -2223,6 +2223,7 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	    << s.net_num_added_var_syms()
 	    << " Added variable symbols not referenced by debug info:\n\n";
 
+      bool emitted = false;
       vector<elf_symbol_sptr> sorted_added_unrefed_var_syms;
       sort_string_elf_symbol_map(d.priv_->added_unrefed_var_syms_,
 				 sorted_added_unrefed_var_syms);
@@ -2240,9 +2241,10 @@  default_reporter::report(const corpus_diff& d, ostream& out,
 	  show_linkage_name_and_aliases(out, "", **i,
 					d.second_corpus()->get_fun_symbol_map());
 	  out << "\n";
+	  emitted = true;
 	}
-      if (sorted_added_unrefed_var_syms.size())
-	out << '\n';
+      if (emitted)
+	out << "\n";
     }
 
   // Report added/removed/changed types not reacheable from public
diff --git a/src/abg-leaf-reporter.cc b/src/abg-leaf-reporter.cc
index 85678013..4b85d816 100644
--- a/src/abg-leaf-reporter.cc
+++ b/src/abg-leaf-reporter.cc
@@ -333,8 +333,8 @@  leaf_reporter::report(const scope_diff& d,
 
       out << indent << "  '"
 	  << (*dif)->first_subject()->get_pretty_representation()
-          << "' was changed to '"
-          << (*dif)->second_subject()->get_pretty_representation() << "'";
+	  << "' was changed to '"
+	  << (*dif)->second_subject()->get_pretty_representation() << "'";
       report_loc_info((*dif)->second_subject(), *d.context(), out);
       out << ":\n";
 
@@ -1036,7 +1036,6 @@  leaf_reporter::report(const corpus_diff& d,
 
   const diff_context_sptr& ctxt = d.context();
 
-  size_t removed = 0, added = 0;
   const corpus_diff::diff_stats &s =
     const_cast<corpus_diff&>(d).
     apply_filters_and_suppressions_before_reporting();
@@ -1066,6 +1065,7 @@  leaf_reporter::report(const corpus_diff& d,
       else if (s.net_num_func_removed() > 1)
 	out << indent << s.net_num_func_removed() << " Removed functions:\n\n";
 
+      bool emitted = false;
       vector<function_decl*>sorted_deleted_fns;
       sort_string_function_ptr_map(d.priv_->deleted_fns_, sorted_deleted_fns);
       for (vector<function_decl*>::const_iterator i =
@@ -1098,9 +1098,9 @@  leaf_reporter::report(const corpus_diff& d,
 		  << c->get_pretty_representation()
 		  << "\n";
 	    }
-	  ++removed;
+	  emitted = true;
 	}
-      if (removed)
+      if (emitted)
 	out << "\n";
     }
 
@@ -1114,7 +1114,7 @@  leaf_reporter::report(const corpus_diff& d,
 	out << indent << num_changed
 	    << " functions with some sub-type change:\n\n";
 
-      bool changed = false;
+      bool emitted = false;
       vector<function_decl_diff_sptr> sorted_changed_fns;
       sort_string_function_decl_diff_sptr_map(d.priv_->changed_fns_map_,
 					      sorted_changed_fns);
@@ -1167,14 +1167,11 @@  leaf_reporter::report(const corpus_diff& d,
 		}
 	      diff->report(out, indent + "    ");
 	      out << "\n";
-	      changed |= true;
+	      emitted = true;
 	    }
 	}
-      if (changed)
-	{
-	  out << "\n";
-	  changed = false;
-	}
+      if (emitted)
+	out << "\n";
     }
 
   if (ctxt->show_added_fns())
@@ -1184,6 +1181,7 @@  leaf_reporter::report(const corpus_diff& d,
       else if (s.net_num_func_added() > 1)
 	out << indent << s.net_num_func_added()
 	    << " Added functions:\n\n";
+      bool emitted = false;
       vector<function_decl*> sorted_added_fns;
       sort_string_function_ptr_map(d.priv_->added_fns_, sorted_added_fns);
       for (vector<function_decl*>::const_iterator i = sorted_added_fns.begin();
@@ -1219,13 +1217,10 @@  leaf_reporter::report(const corpus_diff& d,
 		  << c->get_pretty_representation()
 		  << "\n";
 	    }
-	  ++added;
-	}
-      if (added)
-	{
-	  out << "\n";
-	  added = false;
+	  emitted = true;
 	}
+      if (emitted)
+	out << "\n";
     }
 
   // Now show the changed types.
diff --git a/tests/data/test-abicompat/test1-fn-removed-report-0.txt b/tests/data/test-abicompat/test1-fn-removed-report-0.txt
index acc1584a..bd8560de 100644
--- a/tests/data/test-abicompat/test1-fn-removed-report-0.txt
+++ b/tests/data/test-abicompat/test1-fn-removed-report-0.txt
@@ -6,4 +6,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 
   'function void fun2()'    {_Z4fun2v}
 
-
diff --git a/tests/data/test-abicompat/test3-fn-removed-report-0.txt b/tests/data/test-abicompat/test3-fn-removed-report-0.txt
index ba05d574..63d5d2e8 100644
--- a/tests/data/test-abicompat/test3-fn-removed-report-0.txt
+++ b/tests/data/test-abicompat/test3-fn-removed-report-0.txt
@@ -6,4 +6,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 
   'function void _internal_fun1()'    {_Z4fun1v@@VERSION_1.0}
 
-
diff --git a/tests/data/test-abidiff-exit/test2-filtered-removed-fns-report0.txt b/tests/data/test-abidiff-exit/test2-filtered-removed-fns-report0.txt
index 9ae258c9..bd34dbf5 100644
--- a/tests/data/test-abidiff-exit/test2-filtered-removed-fns-report0.txt
+++ b/tests/data/test-abidiff-exit/test2-filtered-removed-fns-report0.txt
@@ -5,4 +5,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 
   'function void to_erase()'    {to_erase}
 
-
diff --git a/tests/data/test-abidiff/test-PR18791-report0.txt b/tests/data/test-abidiff/test-PR18791-report0.txt
index e24ce778..5758077d 100644
--- a/tests/data/test-abidiff/test-PR18791-report0.txt
+++ b/tests/data/test-abidiff/test-PR18791-report0.txt
@@ -198,4 +198,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
         unqualified underlying type 'struct sigc::trackable' changed, as reported earlier
 
 
-
diff --git a/tests/data/test-diff-dwarf/test31-vtable-changes-report-0.txt b/tests/data/test-diff-dwarf/test31-vtable-changes-report-0.txt
index 23e6fb52..5402280e 100644
--- a/tests/data/test-diff-dwarf/test31-vtable-changes-report-0.txt
+++ b/tests/data/test-diff-dwarf/test31-vtable-changes-report-0.txt
@@ -13,4 +13,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
       note that this is an ABI incompatible change to the vtable of struct S
 
 
-
diff --git a/tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt b/tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt
index 1dd410ca..91b92d20 100644
--- a/tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt
+++ b/tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt
@@ -46,4 +46,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 
 
 
-
diff --git a/tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt b/tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt
index 46e71c78..fcab9120 100644
--- a/tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt
+++ b/tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt
@@ -48,4 +48,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 
 
 
-
diff --git a/tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt b/tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt
index 52692d9f..f0a25a2e 100644
--- a/tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt
+++ b/tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt
@@ -79,4 +79,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
       details were reported earlier
 
 
-
diff --git a/tests/data/test-diff-filter/test10-report.txt b/tests/data/test-diff-filter/test10-report.txt
index 64969890..bdc31fd0 100644
--- a/tests/data/test-diff-filter/test10-report.txt
+++ b/tests/data/test-diff-filter/test10-report.txt
@@ -17,4 +17,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 
 
 
-
diff --git a/tests/data/test-diff-filter/test41-report-0.txt b/tests/data/test-diff-filter/test41-report-0.txt
index cdae9c56..c908a059 100644
--- a/tests/data/test-diff-filter/test41-report-0.txt
+++ b/tests/data/test-diff-filter/test41-report-0.txt
@@ -50,7 +50,6 @@  Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen
   [C] 'method bool abigail::xml_writer::write_context::type_ptr_cmp::operator()(const abigail::ir::type_base*, const abigail::ir::type_base*) const' at abg-writer.cc:359:1 has some indirect sub-type changes:
 
 
-
 1 Removed function symbol not referenced by debug info:
 
   _ZN7abigail10xml_writer13write_contextD1Ev
diff --git a/tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64--libcdio-0.94-2.fc26.x86_64-report.1.txt b/tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64--libcdio-0.94-2.fc26.x86_64-report.1.txt
index b3be1535..d73fae52 100644
--- a/tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64--libcdio-0.94-2.fc26.x86_64-report.1.txt
+++ b/tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64--libcdio-0.94-2.fc26.x86_64-report.1.txt
@@ -52,6 +52,5 @@ 
 
     'method void std::vector<ISO9660::Stat*, std::allocator<ISO9660::Stat*> >::_M_realloc_insert<ISO9660::Stat*>(std::vector<ISO9660::Stat*, std::allocator<ISO9660::Stat*> >::iterator, ISO9660::Stat*&&)'    {_ZNSt6vectorIPN7ISO96604StatESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_}
 
-
 ================ end of changes of 'libiso9660++.so.0.0.0'===============
 
diff --git a/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt b/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt
index 3819aed9..05d6fcad 100644
--- a/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt
+++ b/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt
@@ -92,6 +92,5 @@ 
 
 
 
-
 ================ end of changes of 'libsigc-2.0.so.0.0.0'===============
 
diff --git a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-0.txt b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-0.txt
index 9251c43f..bf081f52 100644
--- a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-0.txt
+++ b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-0.txt
@@ -54,6 +54,5 @@ 
           enum type 'enum __anonymous_enum__2' changed at spice.h:471:1, as reported earlier
 
 
-
 ================ end of changes of 'libspice-server.so.1.8.0'===============
 
diff --git a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-1.txt b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-1.txt
index 9251c43f..bf081f52 100644
--- a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-1.txt
+++ b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-1.txt
@@ -54,6 +54,5 @@ 
           enum type 'enum __anonymous_enum__2' changed at spice.h:471:1, as reported earlier
 
 
-
 ================ end of changes of 'libspice-server.so.1.8.0'===============
 
diff --git a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt
index b885629e..b4104bda 100644
--- a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt
+++ b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt
@@ -392,6 +392,5 @@ 
           enum type 'enum __anonymous_enum__2' changed at spice.h:471:1, as reported earlier
 
 
-
 ================ end of changes of 'libspice-server.so.1.8.0'===============
 
diff --git a/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt b/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt
index 69f438ea..f8e60b50 100644
--- a/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt
+++ b/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt
@@ -255,7 +255,6 @@ 
     'function size_t safer_scalable_msize(void*, typedef size_t (void*)*)'    {safer_scalable_msize}
     'function void* safer_scalable_realloc(void*, size_t, void*)'    {safer_scalable_realloc}
 
-
   27 Added function symbols not referenced by debug info:
 
     _Z10BitScanRevm
@@ -304,6 +303,5 @@ 
     'function size_t malloc_usable_size(void*)'    {malloc_usable_size}
     'function void* valloc(size_t)'    {__libc_valloc, aliases valloc}
 
-
 ================ end of changes of 'libtbbmalloc_proxy.so.2'===============
 
diff --git a/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt b/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt
index de74f1c5..10816705 100644
--- a/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt
+++ b/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt
@@ -111,7 +111,6 @@ 
     'function size_t safer_scalable_msize(void*, typedef size_t (void*)*)'    {safer_scalable_msize}
     'function void* safer_scalable_realloc(void*, size_t, void*)'    {safer_scalable_realloc}
 
-
   27 Added function symbols not referenced by debug info:
 
     _Z10BitScanRevm
@@ -160,6 +159,5 @@ 
     'function size_t malloc_usable_size(void*)'    {malloc_usable_size}
     'function void* valloc(size_t)'    {__libc_valloc, aliases valloc}
 
-
 ================ end of changes of 'libtbbmalloc_proxy.so.2'===============
 
diff --git a/tests/data/test-diff-pkg/test-rpm-report-0.txt b/tests/data/test-diff-pkg/test-rpm-report-0.txt
index 3fb8b8cc..df340812 100644
--- a/tests/data/test-diff-pkg/test-rpm-report-0.txt
+++ b/tests/data/test-diff-pkg/test-rpm-report-0.txt
@@ -28,7 +28,6 @@ 
     'function BaseInfo* base_info_ref(BaseInfo*)'    {base_info_ref}
     'function void base_info_unref(BaseInfo*)'    {base_info_unref}
 
-
   1 Added function symbol not referenced by debug info:
 
     dbus_g_value_build_g_variant
diff --git a/tests/data/test-diff-pkg/test-rpm-report-5.txt b/tests/data/test-diff-pkg/test-rpm-report-5.txt
index a1015ef8..56140b44 100644
--- a/tests/data/test-diff-pkg/test-rpm-report-5.txt
+++ b/tests/data/test-diff-pkg/test-rpm-report-5.txt
@@ -8,6 +8,5 @@ 
     'function BaseInfo* base_info_ref(BaseInfo*)'    {base_info_ref}
     'function void base_info_unref(BaseInfo*)'    {base_info_unref}
 
-
 ================ end of changes of 'dbus-binding-tool'===============
 
diff --git a/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-0.txt b/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-0.txt
index e64a5b55..054254fb 100644
--- a/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-0.txt
+++ b/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-0.txt
@@ -15,4 +15,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
           'unsigned int S::bar', at offset 32 (in bits)
 
 
-
diff --git a/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-3.txt b/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-3.txt
index 1d859f62..29d021e9 100644
--- a/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-3.txt
+++ b/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-3.txt
@@ -5,4 +5,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 
   'function void bar()'    {_Z3barv}
 
-
diff --git a/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-1.txt b/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-1.txt
index 44031050..1dab9503 100644
--- a/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-1.txt
+++ b/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-1.txt
@@ -3,4 +3,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 Function symbols changes summary: 0 Removed, 0 Added (1 filtered out) function symbol not referenced by debug info
 Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info
 
-
diff --git a/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-2.txt b/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-2.txt
index 44031050..1dab9503 100644
--- a/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-2.txt
+++ b/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-2.txt
@@ -3,4 +3,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 Function symbols changes summary: 0 Removed, 0 Added (1 filtered out) function symbol not referenced by debug info
 Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info
 
-
diff --git a/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-4.txt b/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-4.txt
index 44031050..1dab9503 100644
--- a/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-4.txt
+++ b/tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-4.txt
@@ -3,4 +3,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 Function symbols changes summary: 0 Removed, 0 Added (1 filtered out) function symbol not referenced by debug info
 Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info
 
-
diff --git a/tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-5.txt b/tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-5.txt
index d0ff1d37..1df0ef5c 100644
--- a/tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-5.txt
+++ b/tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-5.txt
@@ -3,4 +3,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 Function symbols changes summary: 0 Removed, 0 Added function symbol not referenced by debug info
 Variable symbols changes summary: 0 Removed, 0 Added (2 filtered out) variable symbols not referenced by debug info
 
-
diff --git a/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-2.txt b/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-2.txt
index 2b4f9883..e0914d64 100644
--- a/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-2.txt
+++ b/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-2.txt
@@ -3,7 +3,6 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 Function symbols changes summary: 0 Removed, 0 Added function symbol not referenced by debug info
 Variable symbols changes summary: 0 Removed (2 filtered out), 1 Added variable symbols not referenced by debug info
 
-
 1 Added variable symbol not referenced by debug info:
 
   global_var3
diff --git a/tests/data/test-diff-suppr/test30-report-0.txt b/tests/data/test-diff-suppr/test30-report-0.txt
index be32d3f7..9ac85d53 100644
--- a/tests/data/test-diff-suppr/test30-report-0.txt
+++ b/tests/data/test-diff-suppr/test30-report-0.txt
@@ -30,4 +30,3 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 
 
 
-