mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-29 12:42:50 +00:00
19013fd110
Since the work on un-sharing diff tree nodes, it looks like some reports of regression tests on i686 order functions and variables in different orders, leading to test failures on 32 bits platforms because they are different fromthe 64 bits platforms that we use as a reference. This patch sorts (lexicographically) the children diff nodes of a given diff node in general, and also sorts the set of diff nodes for functions and variables that have sub-type changes, in a given corpus_diff. That way, the result of the diff report should be sorted the same way, whatever the platform. * include/abg-comparison.h (function_decl_diff_sptrs_type) (var_diff_sptrs_type): New typedefs. (corpus_diff::{changed_functions, changed_variables}): Declare new methods. * src/abg-comparison.cc (sort_string_function_decl_diff_sptr_map) (sort_string_var_diff_sptr_map): Forward declare these static functions there were already defined later. (struct diff_less_than_functor): Define new comparison functor. (diff::append_child_node): Sort the children diff nodes of a given diff node. (corpus_diff::priv::changed_fns_map_): Renamed the data member corpus_diff::priv::changed_fns_ into this. (corpus_diff::priv::changed_fns_): New data member that is a sorted vector of changed functions. (corpus_diff::priv::{lookup_tables_empty, clear_lookup_tables}): Adjust changed_fns_ -> changed_fns_map_ and changed_vars_ -> changed_vars_map_. (corpus_diff::priv::ensure_lookup_tables_populated): Likewise. Sort the changed functions and changed variables. (corpus_diff::priv::apply_filters_and_compute_diff_stats): Adjust changed_fns_ -> changed_fns_map_ and changed_vars_ -> changed_vars_map_. Also, walk the changed functions and variables diff nodes in their sorted order. (corpus_diff::priv::{categorize_redundant_changed_sub_nodes, clear_redundancy_categorization, maybe_dump_diff_tree}): Walk the changed functions and variables diff nodes in their sorted order. * include/abg-ir.h (function_decl::get_pretty_representation_of_declarator): Declarenew method. * src/abg-ir.cc (function_decl::get_pretty_representation_of_declarator): Define new function. Its content got split out of ... (function_decl::get_pretty_representation): ... this one. * src/abg-comparison.cc (corpus_diff::chain_into_hierarchy): Consider the sorted the children nodes of a diff tree node. (corpus_diff::append_child_node): Keep the children nodes of a diff tree node sorted. (corpus_diff::{changed_functions, changed_variables, length, report}): Adjust. (corpus_diff::{changed_functions_sorted, changed_variables_sorted}): Define new functions. (function_comp::operator()): First compare the qualified function names along with the parameter declarations, then the rest. (sort_string_function_decl_diff_sptr_map) (sort_string_var_diff_sptr_map): Adjust. * tests/data/test-abicompat/test0-fn-changed-report-0.txt: Adjust. * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust. * tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: Adjust. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
libtest4-local-suppr-v0.so | ||
libtest4-local-suppr-v1.so | ||
libtest5-fn-suppr-v0.so | ||
libtest5-fn-suppr-v1.so | ||
libtest6-fn-suppr-v0.so | ||
libtest6-fn-suppr-v1.so | ||
libtest7-var-suppr-v0.so | ||
libtest7-var-suppr-v1.so | ||
libtest8-redundant-fn-v0.so | ||
libtest8-redundant-fn-v1.so | ||
libtest9-changed-parm-c-v0.so | ||
libtest9-changed-parm-c-v1.so | ||
libtest10-changed-parm-c-v0.so | ||
libtest10-changed-parm-c-v1.so | ||
test0-type-suppr-0.suppr | ||
test0-type-suppr-1.suppr | ||
test0-type-suppr-2.suppr | ||
test0-type-suppr-report-0.txt | ||
test0-type-suppr-report-1.txt | ||
test0-type-suppr-report-2.txt | ||
test0-type-suppr-report-3.txt | ||
test0-type-suppr-v0.cc | ||
test0-type-suppr-v0.o | ||
test0-type-suppr-v1.cc | ||
test0-type-suppr-v1.o | ||
test1-typedef-suppr-0.suppr | ||
test1-typedef-suppr-1.suppr | ||
test1-typedef-suppr-report-0.txt | ||
test1-typedef-suppr-report-1.txt | ||
test1-typedef-suppr-report-2.txt | ||
test1-typedef-suppr-v0.c | ||
test1-typedef-suppr-v0.o | ||
test1-typedef-suppr-v1.c | ||
test1-typedef-suppr-v1.o | ||
test1-typedef-suppr.h | ||
test2-struct-suppr-0.suppr | ||
test2-struct-suppr-1.suppr | ||
test2-struct-suppr-report-0.txt | ||
test2-struct-suppr-report-1.txt | ||
test2-struct-suppr-v0.cc | ||
test2-struct-suppr-v0.o | ||
test2-struct-suppr-v1.cc | ||
test2-struct-suppr-v1.o | ||
test3-struct-suppr-0.suppr | ||
test3-struct-suppr-1.suppr | ||
test3-struct-suppr-report-0.txt | ||
test3-struct-suppr-report-1.txt | ||
test3-struct-suppr-report-2.txt | ||
test3-struct-suppr-v0.cc | ||
test3-struct-suppr-v0.o | ||
test3-struct-suppr-v1.cc | ||
test3-struct-suppr-v1.o | ||
test4-local-suppr-0.suppr | ||
test4-local-suppr-report-0.txt | ||
test4-local-suppr-report-1.txt | ||
test4-local-suppr-v0.c | ||
test4-local-suppr-v0.h | ||
test4-local-suppr-v1.c | ||
test4-local-suppr-v1.h | ||
test5-fn-suppr-0.suppr | ||
test5-fn-suppr-1.suppr | ||
test5-fn-suppr-2.suppr | ||
test5-fn-suppr-3.suppr | ||
test5-fn-suppr-4.suppr | ||
test5-fn-suppr-report-0.txt | ||
test5-fn-suppr-report-1.txt | ||
test5-fn-suppr-report-2.txt | ||
test5-fn-suppr-report-3.txt | ||
test5-fn-suppr-report-4.txt | ||
test5-fn-suppr-report-5.txt | ||
test5-fn-suppr-v0.cc | ||
test5-fn-suppr-v1.cc | ||
test6-fn-suppr-0.suppr | ||
test6-fn-suppr-1.suppr | ||
test6-fn-suppr-2.suppr | ||
test6-fn-suppr-3.suppr | ||
test6-fn-suppr-report-0.txt | ||
test6-fn-suppr-report-1.txt | ||
test6-fn-suppr-report-2.txt | ||
test6-fn-suppr-report-3.txt | ||
test6-fn-suppr-report-4.txt | ||
test6-fn-suppr-v0.cc | ||
test6-fn-suppr-v1.cc | ||
test6-fn-suppr-version-script | ||
test7-var-suppr-1.suppr | ||
test7-var-suppr-2.suppr | ||
test7-var-suppr-3.suppr | ||
test7-var-suppr-4.suppr | ||
test7-var-suppr-5.suppr | ||
test7-var-suppr-6.suppr | ||
test7-var-suppr-7.suppr | ||
test7-var-suppr-8.suppr | ||
test7-var-suppr-report-0.txt | ||
test7-var-suppr-report-1.txt | ||
test7-var-suppr-report-2.txt | ||
test7-var-suppr-report-3.txt | ||
test7-var-suppr-report-4.txt | ||
test7-var-suppr-report-5.txt | ||
test7-var-suppr-report-6.txt | ||
test7-var-suppr-report-7.txt | ||
test7-var-suppr-report-8.txt | ||
test7-var-suppr-v0.cc | ||
test7-var-suppr-v1.cc | ||
test7-var-suppr-version-script | ||
test8-redundant-fn-report-0.txt | ||
test8-redundant-fn-report-1.txt | ||
test8-redundant-fn-v0.cc | ||
test8-redundant-fn-v1.cc | ||
test9-changed-parm-c-report-0.txt | ||
test9-changed-parm-c-report-1.txt | ||
test9-changed-parm-c-v0.c | ||
test9-changed-parm-c-v1.c | ||
test10-changed-parm-c-report-0.txt | ||
test10-changed-parm-c-v0.c | ||
test10-changed-parm-c-v1.c |