mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-12 04:54:35 +00:00
436dfe900f
2 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Dodji Seketeli
|
3c33437ddf |
ctf-reader: Enumerate dicts in the archive rather than using their name
ctf::reader::process_ctf_archive calls ctf_dict_open with the name of the (parent) dictionary to open. If that parent dictionary is set to an unexpected name, then the call to ctf_dict_open fails. This can happen for instance when at link time, the name of the parent dictionary is set to an arbitrary name using the "ctf_link_set_memb_name_changer" function. This patch enumerates the dictionaries of the archive to avoid having to know the name of the parent dictionary. The enumeration is done using the ctf_archive_next function of libctf. There is currently no binary with an unexpected dictionary name in the test suite so this patch cannot be tested for that particular case. I'd be glad to have such binaries added to the test suite. In the mean time this patch has been tested successfully using "make fullcheck" on the existing test suite. * src/abg-ctf-reader.cc (reader::process_ctf_archive): Do not use ctf_dict_open to open the dictionary by name. Rather, enumerate the dictionaries of the current archive by using ctf_archive_next just like what lookup_symbol_in_ctf_archive does. Set the argument of the skip_parent parameter to "false" to ensure we get the parent dictionary. (lookup_symbol_in_ctf_archive): Clean this up to properly initialize the parameters and to document the arguments to the parameters of ctf_archive_next. Use nullptr instead of NULL. * tests/data/test-diff-pkg-ctf/test-rpm-report-1.txt: Adjust. * tests/data/test-diff-pkg-ctf/test-rpm-report-2.txt: Adjust. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
Guillermo E. Martinez via Libabigail
|
5a36bb779d |
Add regression tests for abipkgdiff using ctf info
This patch is meant to execute the testsuite for abipkgdiff tool using sources with CTF debug info. * doc/manuals/abipkgdiff.rst: Document the fact that abipkgdiff now supports the CTF format. * tests/data/test-diff-pkg-ctf/cracklib-2.9.6-15-ol8.x86_64-report-0.txt: New test input. * tests/data/test-diff-pkg-ctf/cracklib-2.9.6-15-ol8u0.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/cracklib-2.9.6-15-ol8u6.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-0-dir1/dir.abignore: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-0-dir1/libobj-v0.so: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-0-dir1/obj-v0.c: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-0-dir2/libobj-v0.so: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-0-dir2/obj-v0.c: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-0-report-0.txt: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-1-dir1/libobj-v0.so: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-1-dir1/obj-v0.c: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-1-dir2/dir.abignore: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-1-dir2/libobj-v0.so: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-1-dir2/obj-v0.c: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-1-report-0.txt: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-1-report-1.txt: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-2-dir1/libobj-v0.so: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-2-dir1/obj-v0.c: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-2-dir2/.abignore: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-2-dir2/dir.abignore: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-2-dir2/libobj-v0.so: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-2-dir2/obj-v0.c: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-2-report-0.txt: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-3-dir1/libobj-v0.so: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-3-dir1/obj-v0.c: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-3-dir2/.abignore: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-3-dir2/libobj-v0.so: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-3-dir2/obj-v0.c: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-3-report-0.txt: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-3-report-1.txt: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-3-report-2.txt: Likewise. * tests/data/test-diff-pkg-ctf/dirpkg-3.suppr: Likewise. * tests/data/test-diff-pkg-ctf/elfutils-libelf-0.186-1.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/elfutils-libelf-0.186-2.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/elfutils-libelf-0.186-report-0.txt: Likewise. * tests/data/test-diff-pkg-ctf/elfutils-libelf-0.186-report-1.txt: Likewise. * tests/data/test-diff-pkg-ctf/gmp-6.1.2-8-ol8u0.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/gmp-6.2.0-10-ol9u0.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/gmp-6.x.x86_64-report-0.txt: Likewise. * tests/data/test-diff-pkg-ctf/isl-0.16.1-6.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/isl-0.16.1-7.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/isl-0.16.1-report-0.txt: Likewise. * tests/data/test-diff-pkg-ctf/isl-debuginfo-0.16.1-6.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/isl-debuginfo-0.16.1-7.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/libdwarf-20180129-4-no-ctf.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/libdwarf-20180129-4.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/libdwarf-20180129-5-no-ctf.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/libdwarf-20180129-5.x86_64.rpm: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1-report0.txt: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1/dir1/symlinks/foo.o: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1/dir1/symlinks/libfoo.so: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1/dir1/targets/foo.c: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1/dir1/targets/foo.o: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1/dir1/targets/libfoo.so: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1/dir2/symlinks/foo.o: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1/dir2/symlinks/libfoo.so: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1/dir2/targets/foo.c: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1/dir2/targets/foo.o: Likewise. * tests/data/test-diff-pkg-ctf/symlink-dir-test1/dir2/targets/libfoo.so: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-0-dir1.ta: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-0-dir1.tar: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-0-dir1.tar.bz2: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-0-dir1.tar.gz: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-0-dir2.ta: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-0-dir2.tar: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-0-dir2.tar.bz2: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-0-dir2.tar.gz: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-0-report-0.txt: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-1-dir1.tar.gz: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-1-dir2.tar.gz: Likewise. * tests/data/test-diff-pkg-ctf/tarpkg-1-report-0.txt: Likewise. * tests/data/test-diff-pkg-ctf/test-rpm-report-0.txt: Likewise. * tests/data/test-diff-pkg-ctf/test-rpm-report-1.txt: Likewise. * tests/data/test-diff-pkg-ctf/test-rpm-report-2.txt: Likewise. * tests/data/test-diff-pkg-ctf/test-rpm-report-3.txt: Likewise. * tests/data/test-diff-pkg-ctf/test-rpm-report-4.txt: Likewise. * tests/data/test-diff-pkg-ctf/test-rpm-report-5.txt: Likewise. * tests/data/Makefile.am: Add the test material above to source distribution. * tests/test-diff-pkg.cc (in_out_spec): Add the test inputs above to this harness. Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> |