libabigail/tests
Dodji Seketeli 18e4697e05 Better support array with unknown upper bound
It can happen that arrays are described in DWARF with an unknown upper
bound.  In those cases, if the array is the type of a global variable,
the ELF object corresponding to that global variable should have a
size.  It's that ELF object size that should be taken into account
when comparing versions of that global variable and its type.

This patch fixes issues in the detection and representation of array
subranges with unknown size so that we behave like presented above.

	* include/abg-comparison.h
	(BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY): A new enumerator in the
	diff_category enum.
	(EVERYTHING_CATEGORY): Adjust.
	* src/abg-comparison.cc (get_default_harmless_categories_bitmap):
	Adjust.
	(operator<<(ostream& o, diff_category)): Likewise.
	* include/abg-ir.h (array_type_def::subrange_type::is_infinite):
	Declare new member function.
	* src/abg-ir.cc (array_type_def::subrange_type::priv::infinite_):
	New data member.
	(array_type_def::subrange_type::priv::priv): Initialize it.
	(array_type_def::subrange_type::get_length): Better support
	unknown sized subrange.
	(array_type_def::subrange_type::is_infinite): Define new member
	function.
	* src/abg-comp-filter.cc (has_benign_infinite_array_change):
	Define new static function.
	(categorize_harmless_diff_node): Use the new
	has_benign_infinite_array_change above.
	* src/abg-dwarf-reader.cc (build_subrange_type): Better recognize a
	subrange type with unknown upper bound.  Represent that with the
	new array_type_def::subrange_type::is_infinite member property.
	* src/abg-reader.cc (build_subrange_type): Likewise.
	* tests/data/test-abidiff/test-PR18166-libtirpc.so.abi: Adjust.
	* tests/data/test-annotate/libtest23.so.abi: Likewise.
	* tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
	* tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
	* tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
	* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Likewise.
	* tests/data/test-annotate/test7.so.abi: Likewise.
	* tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
	* tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi: Likewise.
	* tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
	* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
	* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
	* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
	* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
	* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
	* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2018-10-16 18:00:22 +02:00
..
data Better support array with unknown upper bound 2018-10-16 18:00:22 +02:00
Makefile.am Bug 23533 - Accept '=' in ini property values 2018-08-30 10:54:33 +02:00
mockfedabipkgdiff.in Bug 22722 - Make fedabipkgdiff and its tests support both python 3 and 2 2018-03-29 13:46:50 +02:00
print-diff-tree.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
runtestcanonicalizetypes.sh.in
runtestdefaultsupprs.py.in Fix typo in tests/runtestdefaultsupprs.py 2018-05-24 10:48:56 +02:00
runtestdefaultsupprspy3.sh.in Bug 22722 - Make fedabipkgdiff and its tests support both python 3 and 2 2018-03-29 13:46:50 +02:00
runtestfedabipkgdiff.py.in Bug 22722 - Make fedabipkgdiff and its tests support both python 3 and 2 2018-03-29 13:46:50 +02:00
runtestfedabipkgdiffpy3.sh.in Bug 22722 - Make fedabipkgdiff and its tests support both python 3 and 2 2018-03-29 13:46:50 +02:00
test-abicompat.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-abidiff-exit.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-abidiff.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-alt-dwarf-file.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-annotate.cc Wire the --no-show-locs option to abidw 2017-11-02 12:57:11 +01:00
test-core-diff.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-diff2.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-diff-dwarf-abixml.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-diff-dwarf.cc Explicitely detect anonymous data member changes 2018-06-06 14:07:10 +02:00
test-diff-filter.cc Bug 23708 - categorize void* to pointer change as harmless 2018-10-03 11:42:47 +02:00
test-diff-pkg.cc Identify a function using its symbol name and version 2018-06-08 05:12:24 +02:00
test-diff-suppr.cc Fix propagation of private type suppression category 2018-10-01 16:14:50 +02:00
test-dot.cc
test-ini.cc Bug 23533 - Accept '=' in ini property values 2018-08-30 10:54:33 +02:00
test-ir-walker.cc Add option to avoid walking abigail::ir nodes twice 2018-09-03 13:32:06 +02:00
test-lookup-syms.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-read-dwarf.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-read-write.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-svg.cc
test-types-stability.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-utils.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-utils.h Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
test-valgrind-suppressions.supp Shut down a helgrind false positive in the "system" libc call 2017-03-17 09:02:19 +01:00
test-write-read-archive.cc Update copyright notice for all source files 2018-01-08 18:24:26 +01:00
update-test-output.py Rename tests/update-test-read-dwarf-output.py 2016-12-02 12:59:32 +01:00