mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-22 01:40:12 +00:00
ccdc44b3eb
4 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Dodji Seketeli
|
f2175b70cc |
Adjust some tests for output changes
After commit "8a4b0c9 Fix missing newlines in diff report", I forgot to adjust some test reference outputs, leading to some test failures. Fixed thus. * tests/data/test-abidiff/test-struct1-report.txt: Adjust. * tests/data/test-diff-dwarf/test10-report.txt: Likewise. * tests/data/test-diff-dwarf/test11-report.txt: Likewise. * tests/data/test-diff-dwarf/test13-report.txt: Likewise. * tests/data/test-diff-filter/test2-report.txt: Likewise. * tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Likewise. * tests/data/test-diff-filter/test26-qualified-redundant-node-report-1.txt: Likewise. * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt: Likewise. * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
Dodji Seketeli
|
8cc7a3e8ef |
Make indexes of function parameters start at 1
This patch make indexes of a function parameters start at 1, rather at 0 like they used to be. Actually, for member functions, the artificial implicit 'this' pointer parameter starts at 0. In that case, the first non-implicit parameter starts at 1 too, then. The biggest part of the patch adjusts the numerous test cases that are impacted. * src/abg-ir.cc (function_type::function_type): Starts the index of the parameters at 1, unless the firs parameter is an artificial one, in which case it starts at 0. * tests/data/test-abicompat/test5-fn-changed-report-0.txt: Adjust. * tests/data/test-diff-dwarf/test0-report.txt: Adjust. * tests/data/test-diff-dwarf/test1-report.txt: Adjust. * tests/data/test-diff-dwarf/test10-report.txt: Adjust. * tests/data/test-diff-dwarf/test11-report.txt: Adjust. * tests/data/test-diff-dwarf/test13-report.txt: Adjust. * tests/data/test-diff-dwarf/test15-enum-report.txt: Adjust. * tests/data/test-diff-dwarf/test2-report.txt: Adjust. * tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt: Adjust. * tests/data/test-diff-dwarf/test21-redundant-fn-report-0.txt: Adjust. * tests/data/test-diff-dwarf/test22-changed-parm-c-report-0.txt: Adjust. * tests/data/test-diff-dwarf/test24-added-fn-parms-report-0.txt: Adjust. * tests/data/test-diff-dwarf/test25-removed-fn-parms-report-0.txt: Adjust. * tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt: Adjust. * tests/data/test-diff-dwarf/test4-report.txt: Adjust. * tests/data/test-diff-dwarf/test6-report.txt: Adjust. * tests/data/test-diff-dwarf/test7-report.txt: Adjust. * tests/data/test-diff-dwarf/test8-report.txt: Adjust. * tests/data/test-diff-filter/test0-report.txt: Adjust. * tests/data/test-diff-filter/test01-report.txt: Adjust. * tests/data/test-diff-filter/test1-report.txt: Adjust. * tests/data/test-diff-filter/test10-report.txt: Adjust. * tests/data/test-diff-filter/test13-report.txt: Adjust. * tests/data/test-diff-filter/test14-0-report.txt: Adjust. * tests/data/test-diff-filter/test14-1-report.txt: Adjust. * tests/data/test-diff-filter/test16-report-2.txt: Adjust. * tests/data/test-diff-filter/test16-report.txt: Adjust. * tests/data/test-diff-filter/test17-0-report.txt: Adjust. * tests/data/test-diff-filter/test17-1-report.txt: Adjust. * tests/data/test-diff-filter/test18-report.txt: Adjust. * tests/data/test-diff-filter/test19-enum-report-1.txt: Adjust. * tests/data/test-diff-filter/test2-report.txt: Adjust. * tests/data/test-diff-filter/test22-compatible-fns-report-0.txt: Adjust. * tests/data/test-diff-filter/test23-redundant-fn-parm-change-report-0.txt: Adjust. * tests/data/test-diff-filter/test25-cyclic-type-report-0.txt: Adjust. * tests/data/test-diff-filter/test25-cyclic-type-report-1.txt: Adjust. * tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Adjust. * tests/data/test-diff-filter/test26-qualified-redundant-node-report-1.txt: Adjust. * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt: Adjust. * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt: Adjust. * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-0.txt: Adjust. * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-1.txt: Adjust. * tests/data/test-diff-filter/test3-report.txt: Adjust. * tests/data/test-diff-filter/test9-report.txt: Adjust. * tests/data/test-diff-suppr/test0-type-suppr-report-0.txt: Adjust. * tests/data/test-diff-suppr/test0-type-suppr-report-3.txt: Adjust. * tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Adjust. * tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Adjust. * tests/data/test-diff-suppr/test10-changed-parm-c-report-0.txt: Adjust. * tests/data/test-diff-suppr/test2-struct-suppr-report-0.txt: Adjust. * tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Adjust. * tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Adjust. * tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Adjust. * tests/data/test-diff-suppr/test4-local-suppr-report-0.txt: Adjust. * tests/data/test-diff-suppr/test4-local-suppr-report-1.txt: Adjust. * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust. * tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: Adjust. * tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: Adjust. * tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: Adjust. * tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: Adjust. * tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: Adjust. * tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: Adjust. * tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: Adjust. * tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: Adjust. * tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: Adjust. * tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: Adjust. * tests/data/test-diff-suppr/test8-redundant-fn-report-1.txt: Adjust. * tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt: Adjust. * tests/data/test-diff-suppr/test9-changed-parm-c-report-1.txt: Adjust. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
Dodji Seketeli
|
21adfb066f |
Misc reporting fixes/improvements
This patch contains various reporting improvement about how variables and data member changes are represented, as well as how type changes are represented. The number changes itself is not that big, but the number of adjustments to regression test is. * src/abg-comparison.cc (distinct_diff::report): Remove spurious vertical space before reporting size and alignment changes here. (represent): In the variables/data member overload, report type changes first. Then the other changes. (report_size_and_alignment_changes): Make this report array size changes too. Also, make some small adjustments about how type size/alignment changes are introduced. (array_diff::report): Now that report_size_and_alignment_changes() supports size change reporting, just use that function rather than doing it here. (corpus_diff::report): Consistently add a space between each changed function report. Prefix changed variables with a [C], just like for functions. * tests/data/test-abicompat/test0-fn-changed-report-0.txt: Adjust. * tests/data/test-abicompat/test5-fn-changed-report-0.txt: Likewise. * tests/data/test-abicompat/test6-var-changed-report-0.txt: Likewise. * tests/data/test-abidiff/test-qual-type0-report.txt: Likewise. * tests/data/test-abidiff/test-struct0-report.txt: Likewise. * tests/data/test-abidiff/test-struct1-report.txt: Likewise. * tests/data/test-abidiff/test-var0-report.txt: Likewise. * tests/data/test-diff-dwarf/test-23-diff-arch-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test0-report.txt: Likewise. * tests/data/test-diff-dwarf/test1-report.txt: Likewise. * tests/data/test-diff-dwarf/test10-report.txt: Likewise. * tests/data/test-diff-dwarf/test11-report.txt: Likewise. * tests/data/test-diff-dwarf/test13-report.txt: Likewise. * tests/data/test-diff-dwarf/test15-enum-report.txt: Likewise. * tests/data/test-diff-dwarf/test2-report.txt: Likewise. * tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test21-redundant-fn-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test22-changed-parm-c-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test3-report.txt: Likewise. * tests/data/test-diff-dwarf/test6-report.txt: Likewise. * tests/data/test-diff-dwarf/test7-report.txt: Likewise. * tests/data/test-diff-dwarf/test8-report.txt: Likewise. * tests/data/test-diff-dwarf/test9-report.txt: Likewise. * tests/data/test-diff-filter/test0-report.txt: Likewise. * tests/data/test-diff-filter/test01-report.txt: Likewise. * tests/data/test-diff-filter/test1-report.txt: Likewise. * tests/data/test-diff-filter/test10-report.txt: Likewise. * tests/data/test-diff-filter/test11-report.txt: Likewise. * tests/data/test-diff-filter/test13-report.txt: Likewise. * tests/data/test-diff-filter/test14-0-report.txt: Likewise. * tests/data/test-diff-filter/test14-1-report.txt: Likewise. * tests/data/test-diff-filter/test15-0-report.txt: Likewise. * tests/data/test-diff-filter/test15-1-report.txt: Likewise. * tests/data/test-diff-filter/test16-report-2.txt: Likewise. * tests/data/test-diff-filter/test16-report.txt: Likewise. * tests/data/test-diff-filter/test17-0-report.txt: Likewise. * tests/data/test-diff-filter/test17-1-report.txt: Likewise. * tests/data/test-diff-filter/test18-report.txt: Likewise. * tests/data/test-diff-filter/test19-enum-report-1.txt: Likewise. * tests/data/test-diff-filter/test2-report.txt: Likewise. * tests/data/test-diff-filter/test20-inline-report-1.txt: Likewise. * tests/data/test-diff-filter/test21-compatible-vars-report-0.txt: Likewise. * tests/data/test-diff-filter/test22-compatible-fns-report-0.txt: Likewise. * tests/data/test-diff-filter/test23-redundant-fn-parm-change-report-0.txt: Likewise. * tests/data/test-diff-filter/test24-compatible-vars-report-1.txt: Likewise. * tests/data/test-diff-filter/test25-cyclic-type-report-0.txt: Likewise. * tests/data/test-diff-filter/test25-cyclic-type-report-1.txt: Likewise. * tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Likewise. * tests/data/test-diff-filter/test26-qualified-redundant-node-report-1.txt: Likewise. * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-0.txt: Likewise. * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt: Likewise. * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt: Likewise. * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-0.txt: Likewise. * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-1.txt: Likewise. * tests/data/test-diff-filter/test3-report.txt: Likewise. * tests/data/test-diff-filter/test6-report.txt: Likewise. * tests/data/test-diff-filter/test9-report.txt: Likewise. * tests/data/test-diff-suppr/test0-type-suppr-report-0.txt: Likewise. * tests/data/test-diff-suppr/test0-type-suppr-report-3.txt: Likewise. * tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Likewise. * tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Likewise. * tests/data/test-diff-suppr/test10-changed-parm-c-report-0.txt: Likewise. * tests/data/test-diff-suppr/test2-struct-suppr-report-0.txt: Likewise. * tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Likewise. * tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Likewise. * tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Likewise. * tests/data/test-diff-suppr/test4-local-suppr-report-0.txt: Likewise. * tests/data/test-diff-suppr/test4-local-suppr-report-1.txt: Likewise. * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Likewise. * tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: Likewise. * tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: Likewise. * tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: Likewise. * tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: Likewise. * tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: Likewise. * tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: Likewise. * tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: Likewise. * tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: Likewise. * tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: Likewise. * tests/data/test-diff-suppr/test7-var-suppr-report-0.txt: Likewise. * tests/data/test-diff-suppr/test7-var-suppr-report-1.txt: Likewise. * tests/data/test-diff-suppr/test7-var-suppr-report-2.txt: Likewise. * tests/data/test-diff-suppr/test7-var-suppr-report-3.txt: Likewise. * tests/data/test-diff-suppr/test7-var-suppr-report-4.txt: Likewise. * tests/data/test-diff-suppr/test7-var-suppr-report-7.txt: Likewise. * tests/data/test-diff-suppr/test7-var-suppr-report-8.txt: Likewise. * tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: Likewise. * tests/data/test-diff-suppr/test8-redundant-fn-report-1.txt: Likewise. * tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt: Likewise. * tests/data/test-diff-suppr/test9-changed-parm-c-report-1.txt: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
Ondrej Oprala
|
055a789abe |
Support C and C++ array type.
* include/abg-comparison.h (array_diff): Declare new class. (array_diff_sptr): Shared pointer to type array_diff. (compute_diff): Overload the function to take type array_diff_sptr as the first two arguments. * include/abg-fwd.h (array_type_def): Declare new class. (subrange_type): Likewise. (is_array_def): Declare new function. * include/abg-ir.h (array_type_def_sptr): Shared pointer to type array_type_def. (array_type_def): Declare new class. (ir_node_visitor::visit): Declare a new virtual function taking a pointer to type array_type_def as an argument. * src/abg-comparison.cc (compute_diff_for_types): Add try_to_diff for two instances of type array_type_def. (array_diff::priv): declare struct for holding private members of type array_diff. (array_diff::array_diff): Define constructor. (array_diff::{first,second}_array):Define new member functions. (array_diff::element_type_diff): Likewise. (array_diff::{length,report,traverse}): Likewise. (compute_diff): Define function overloaded in include/abg-comparison.h. * src/abg-dwarf-reader.cc (build_array_type): Define new function. Handle DW_TAG_array_type and DW_TAG_subrange type. (build_ir_node_from_die): Amend case DW_TAG_array_type with a call to build_array_type. * src/abg-hash.cc (array_type_def::hash): Declare new struct. (type_base::dynamic_hash::operator()): Attempt to dynamic_cast the argument to type array_type_def as well. (array_type_def::hash): Declare new struct. * src/abg-ir.cc (array_type_def::array_type_def): Define constructors. (array_type_def::priv): declare struct for holding private members of type array_type_def. (array_type_def::operator==(const decl_base&): Define new operator. (array_type_def::operator==(const type_base&): Likewise. (array_type_def::append_subrange{,s}): Define new functions. (array_type_def::{set,get}_size_in_bits): Likewise. (array_type_def::get_dimension_count): Likewise. (array_type_def::get_qualified_name): Likewise. (array_type_def::get_pretty_representation): Likewise. (array_type_def::get_subrange_representation): Likewise. (array_type_def::traverse): Likewise. (array_type_def::get_{element_type,location,subranges}): Likewise. (array_type_def::is_infinite): Likewise. (array_type_def::~array_type_def): Define destructor. (ir_node_visitor::visit): Define function, taking pointer to array_type_def as an argument. * src/abg-reader.cc (map_id_and_node): Check if node is an array. (is_array_def): Check if object is an array. (handle_element_node): Handle array_type_def as well. (build_subrange_type): Define new function. (build_array_type_def): Likewise. (build_type): Build type array_type_def as well. (build_type_composition): Likewise. (handle_array_type_def): Define new function. * src/abg-writer.cc: (write_decl): Output arrays as well. (write_member_type): Likewise. (write_type_composition): Likewise. (write_array_type_def): Define new function. * tests/data/test-diff-dwarf/test{10,11}-v{0,1}.{cc,o}: New test source files * tests/data/test-diff-dwarf/test{10,11}-report.txt: Likewise. * tests/data/test-diff-dwarf/test10-report.txt: New test input. * tests/data/test-read-dwarf/test7.cc: New test source file. * tests/data/test-read-dwarf/test7.so: New input binary to read. * tests/data/test-read-dwarf/test7.so.abi: New reference test to compare against. * tests/data/test-read-write/test25.xml: New test source file. * tests/test-diff-dwarf.cc: Adjust to launch the new test. * tests/test-read-dwarf.cc: Likewise. * tests/test-read-write.cc: Likewise. * test/Makefile.am: Add the new test inputs to the source distribution. Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> |