mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-15 14:34:38 +00:00
72eb3fe482
Add (Catch based) test suite to test kernel symbol table (ksymtab) reading through the result persisted in abigail::corpus. The test cases are created through simple kernel module C source files targeting the desired properties ((gpl) exported / local functions / variables). The kernel binaries are built without debug information to keep them reasonably small and reproducible. That is just enough sufficient to analyze ksymtabs. The Makefile that comes with them recreates the test cases from the sources, given a kernel source tree with the appropriate version, e.g. make KDIR=/path/to/4.14 This covers ksymtab reading and ensuring we detect the kernel binary correctly. The kernel versions are selected based on features introduced into the Linux kernel that affect the ksymtab representation. - Linux v4.14 - reasonably old kernel to start with (actually v4.14.180) - Linux v4.19 - first version having position relative relocations (PREL) in ksymtab entries on some platforms (actually v4.19.123) - Linux v5.4 - first version having symbol namespaces (actually v5.4.41) - Linux v5.6 - latest released stable kernel as of writing (actually v5.6.13) * tests/data/Makefile.am: add new test data for runtestsymtab * tests/data/test-symtab/kernel-4.14/Makefile: New test case makefile. * tests/data/test-symtab/kernel-4.14/empty.c: Likewise. * tests/data/test-symtab/kernel-4.14/one_of_each.c: Likewise. * tests/data/test-symtab/kernel-4.14/single_function.c: Likewise. * tests/data/test-symtab/kernel-4.14/single_function_gpl.c: Likewise. * tests/data/test-symtab/kernel-4.14/single_variable.c: Likewise. * tests/data/test-symtab/kernel-4.14/single_variable_gpl.c: Likewise. * tests/data/test-symtab/kernel-4.14/empty.ko: New test data. * tests/data/test-symtab/kernel-4.14/one_of_each.ko: Likewise. * tests/data/test-symtab/kernel-4.14/single_function.ko: Likewise. * tests/data/test-symtab/kernel-4.14/single_function_gpl.ko: Likewise. * tests/data/test-symtab/kernel-4.14/single_variable.ko: Likewise. * tests/data/test-symtab/kernel-4.14/single_variable_gpl.ko: Likewise. * tests/data/test-symtab/kernel-4.19/Makefile: New test case makefile. * tests/data/test-symtab/kernel-4.19/empty.c: Likewise. * tests/data/test-symtab/kernel-4.19/one_of_each.c: Likewise. * tests/data/test-symtab/kernel-4.19/single_function.c: Likewise. * tests/data/test-symtab/kernel-4.19/single_function_gpl.c: Likewise. * tests/data/test-symtab/kernel-4.19/single_variable.c: Likewise. * tests/data/test-symtab/kernel-4.19/single_variable_gpl.c: Likewise. * tests/data/test-symtab/kernel-4.19/empty.ko: New test data. * tests/data/test-symtab/kernel-4.19/one_of_each.ko: Likewise. * tests/data/test-symtab/kernel-4.19/single_function.ko: Likewise. * tests/data/test-symtab/kernel-4.19/single_function_gpl.ko: Likewise. * tests/data/test-symtab/kernel-4.19/single_variable.ko: Likewise. * tests/data/test-symtab/kernel-4.19/single_variable_gpl.ko: Likewise. * tests/data/test-symtab/kernel-5.4/Makefile: New test case makefile. * tests/data/test-symtab/kernel-5.4/empty.c: Likewise. * tests/data/test-symtab/kernel-5.4/one_of_each.c: Likewise. * tests/data/test-symtab/kernel-5.4/single_function.c: Likewise. * tests/data/test-symtab/kernel-5.4/single_function_gpl.c: Likewise. * tests/data/test-symtab/kernel-5.4/single_variable.c: Likewise. * tests/data/test-symtab/kernel-5.4/single_variable_gpl.c: Likewise. * tests/data/test-symtab/kernel-5.4/empty.ko: New test data. * tests/data/test-symtab/kernel-5.4/one_of_each.ko: Likewise. * tests/data/test-symtab/kernel-5.4/single_function.ko: Likewise. * tests/data/test-symtab/kernel-5.4/single_function_gpl.ko: Likewise. * tests/data/test-symtab/kernel-5.4/single_variable.ko: Likewise. * tests/data/test-symtab/kernel-5.4/single_variable_gpl.ko: Likewise. * tests/data/test-symtab/kernel-5.6/Makefile: New test case makefile. * tests/data/test-symtab/kernel-5.6/empty.c: Likewise. * tests/data/test-symtab/kernel-5.6/one_of_each.c: Likewise. * tests/data/test-symtab/kernel-5.6/single_function.c: Likewise. * tests/data/test-symtab/kernel-5.6/single_function_gpl.c: Likewise. * tests/data/test-symtab/kernel-5.6/single_variable.c: Likewise. * tests/data/test-symtab/kernel-5.6/single_variable_gpl.c: Likewise. * tests/data/test-symtab/kernel-5.6/empty.ko: New test data. * tests/data/test-symtab/kernel-5.6/one_of_each.ko: Likewise. * tests/data/test-symtab/kernel-5.6/single_function.ko: Likewise. * tests/data/test-symtab/kernel-5.6/single_function_gpl.ko: Likewise. * tests/data/test-symtab/kernel-5.6/single_variable.ko: Likewise. * tests/data/test-symtab/kernel-5.6/single_variable_gpl.ko: Likewise. * tests/data/test-symtab/kernel/Makefile: New test case source file. * tests/data/test-symtab/kernel/empty.c: Likewise. * tests/data/test-symtab/kernel/one_of_each.c: Likewise. * tests/data/test-symtab/kernel/single_function.c: Likewise. * tests/data/test-symtab/kernel/single_function_gpl.c: Likewise. * tests/data/test-symtab/kernel/single_variable.c: Likewise. * tests/data/test-symtab/kernel/single_variable_gpl.c: Likewise. * tests/test-symtab.cc: New test case to test kernel symtabs. Signed-off-by: Matthias Maennich <maennich@google.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
data | ||
lib | ||
.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-cxx-compat.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-elf-helpers.cc | ||
test-ini.cc | ||
test-ir-walker.cc | ||
test-kmi-whitelist.cc | ||
test-lookup-syms.cc | ||
test-read-dwarf.cc | ||
test-read-write.cc | ||
test-svg.cc | ||
test-symtab.cc | ||
test-tools-utils.cc | ||
test-types-stability.cc | ||
test-utils.cc | ||
test-utils.h | ||
test-valgrind-suppressions.supp | ||
test-write-read-archive.cc | ||
update-test-output.py |