libabigail/tests/data/test-read-common/test4.so
Guillermo E. Martinez via Libabigail f76484cc9d Add regression tests for ctf reading
This patch implements some regression tests for ctf reading.
Since the code shares a lot of functionalities already used
in the readi-dwarf test, a library was built and test common
harness were moved to a common location. So input files for
test-read-{dwarf,ctf}.cc now are located in:
tests/data/test-read-common directory, ABIs description are
stored in the same location but in a separate file, one for
each binary debugging information: (e.g, test4-ctf.so.abi
and test4-dwarf.so.abi)

	* tests/test-read-ctf.cc: New ctf reading regression test.
	* tests/test-read-common.cc: New library to be used with
	test-read-{ctf,dwarf}.cc.
	* tests/test-read-common.h: Likewise.
	* tests/test-annotate.cc (in_out_specs): Adjust path for input files.
	* tests/Makefile.am: Build new tests/test-read-ctf.cc file.
	* tests/data/Makefile.am: Add test inputs and expected files.
	Add libtestreadcommon.a test library and use it for test-read-{ctf,dwarf}.
	* tests/test-read-dwarf.cc: Adapt test to use libtestreadcommon.a in
	test-read-common.{cc,h}.
	* tests/data/test-annotate/test3.so.abi: Adjust ELF input path file
	location to ./tests/data/test-read-common.
	* tests/data/test-annotate/test4.so.abi: Likewise.
	* tests/data/test-read-common/PR26261: Move test harness to
	test-read-common directory.
	* tests/data/test-read-common/PR27700: Likewise.
	* tests/data/test-read-common/test-PR26568-*: Likewise.
	* tests/data/test-read-common/test3.{c,so}: Likewise.
	* tests/data/test-read-common/test4.{c,so}: Likewise.
	* tests/data/test-read-common/crti*: Helper object to export
	_init and _fini sysmbols.
	* tests/data/test-read-ctf/test-ambiguous-struct-A.c: New testcase.
	* tests/data/test-read-ctf/test-ambiguous-struct-B.c: Likewise.
	* tests/data/test-read-ctf/test-conflicting-type-syms-a.c: Likewise.
	* tests/data/test-read-ctf/test-conflicting-type-syms-b.c: Likewise.
	* tests/data/test-read-ctf/test-enum.c: Likewise.
	* tests/data/test-read-ctf/test-enum-many.c: Likewise.
	* tests/data/test-read-ctf/test-enum-symbol.c: Likewise.
	* tests/data/test-read-ctf/test-struct-iteration.c: Likewise.
	* tests/data/test-read-ctf/test-dynamic-array.c: Likewise.
	* tests/data/test-read-ctf/test0.c: Likewise.
	* tests/data/test-read-ctf/test1.c: Likewise.
	* tests/data/test-read-ctf/test2.c: Likewise.
	* tests/data/test-read-ctf/test5.c: Likewise.
	* tests/data/test-read-ctf/test7.{c,h}: Likewise.
	* tests/data/test-read-ctf/test8.c: Likewise.
	* tests/data/test-read-ctf/test9.c: Likewise.
	* tests/data/test-read-ctf/test-ambiguous-struct-A.o.hash.abi: Testcase
	expected result.
	* tests/data/test-read-ctf/PR26261/PR26261-exe.abi: Likewise.
	* tests/data/test-read-ctf/PR27700/test-PR27700.abi: Likewise.
	* tests/data/test-read-ctf/test-ambiguous-struct-A.o.hash.abi: Likewise.
	* tests/data/test-read-ctf/test-ambiguous-struct-B.o.hash.abi: Likewise.
	* tests/data/test-read-ctf/test-conflicting-type-syms-a.o.hash.abi: Likewise.
	* tests/data/test-read-ctf/test-conflicting-type-syms-b.o.hash.abi: Likewise.
	* tests/data/test-read-ctf/test-enum.o.abi: Likewise.
	* tests/data/test-read-ctf/test-enum-many.o.hash.abi: Likewise.
	* tests/data/test-read-ctf/test-enum-symbol.o.hash.abi: Likewise.
	* tests/data/test-read-ctf/test-struct-iteration.o.abi: Likewise.
	* tests/data/test-read-ctf/test-dynamic-array.o.abi: Likewise.
	* tests/data/test-read-ctf/test0: Likewise.
	* tests/data/test-read-ctf/test0*.abi: Likewise.
	* tests/data/test-read-ctf/test1.so: Likewise.
	* tests/data/test-read-ctf/test1*.abi: Likewise.
	* tests/data/test-read-ctf/test2.so: Likewise.
	* tests/data/test-read-ctf/test2*.abi: Likewise.
	* tests/data/test-read-ctf/test3.so.abi: Likewise.
	* tests/data/test-read-ctf/test4*.abi: Likewise.
	* tests/data/test-read-ctf/test5.o.abi: Likewise.
	* tests/data/test-read-ctf/test7.o.abi: Likewise.
	* tests/data/test-read-ctf/test8.o.abi: Likewise.
	* tests/data/test-read-ctf/test9.o.abi: Likewise.
	* tests/data/test-read-dwarf/PR26261/PR26261-exe.abi: Update
	expected abixml file.
	* tests/data/test-read-dwarf/PR27700/test-PR27700.abi: Likewise.
	* tests/data/test-read-dwarf/test-PR26568-1.*.abi: Likewise.
	* tests/data/test-read-dwarf/test3*.abi: Likewise.
	* tests/data/test-read-dwarf/test4*.abi: Likewise.
	* doc/api/libabigail.doxy: Add tests/test-read-common.{cc,h} to
	doxygen.

Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2021-12-14 16:45:58 +01:00

16 KiB
Executable File