mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-15 22:44:41 +00:00
f754d81116
In this problem report, the issue is that when comparing two corpus groups, especially when looking up function/variable symbols, the get_fun_symbol_map() and get_var_symbol_map() member functions used are corpus::get_{fun,var}_symbol_map, rather than corpus_group::get_{fun, var}_symbol_map. Note that the type corpus_group inherits from the type corpus. That leads to unexpected comparison results, especially for symbols. This patch fixes this by making the corpus::get_{fun, var}_symbol_map member function be virtual and by using it during the lookup of function/variable symbols. That way, the right symbol map gets used. * include/abg-corpus.h (corpus{_group}::get_{fun, var}_symbol_map): Make these member functions virtual. * src/abg-corpus.cc (corpus::lookup_{function, variable}_symbol): Use the virtual corpus::get_{fun, var}_symbol_map() member function to get the symbols of the current corpus or corpus_group. * tests/data/Makefile.am: Add the new test input material below to source distribution. * tests/data/test-abidiff/test-PR24552-report0.txt: New test input. * tests/data/test-abidiff/test-PR24552-v0.abi: Likewise. * tests/data/test-abidiff/test-PR24552-v1.abi: Likewise. * tests/test-abidiff.cc (main): Support comparing corpus groups. (specs): Add the new test inputs to the harness. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
data | ||
.gitignore | ||
Makefile.am | ||
mockfedabipkgdiff.in | ||
print-diff-tree.cc | ||
runtestcanonicalizetypes.sh.in | ||
runtestdefaultsupprs.py.in | ||
runtestdefaultsupprspy3.sh.in | ||
runtestfedabipkgdiff.py.in | ||
runtestfedabipkgdiffpy3.sh.in | ||
test-abicompat.cc | ||
test-abidiff-exit.cc | ||
test-abidiff.cc | ||
test-alt-dwarf-file.cc | ||
test-annotate.cc | ||
test-core-diff.cc | ||
test-diff2.cc | ||
test-diff-dwarf-abixml.cc | ||
test-diff-dwarf.cc | ||
test-diff-filter.cc | ||
test-diff-pkg.cc | ||
test-diff-suppr.cc | ||
test-dot.cc | ||
test-ini.cc | ||
test-ir-walker.cc | ||
test-lookup-syms.cc | ||
test-read-dwarf.cc | ||
test-read-write.cc | ||
test-svg.cc | ||
test-types-stability.cc | ||
test-utils.cc | ||
test-utils.h | ||
test-valgrind-suppressions.supp | ||
test-write-read-archive.cc | ||
update-test-output.py |