mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-14 05:54:50 +00:00
The Git repository of the Libabigail Project
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> |
||
---|---|---|
autoconf-archive | ||
bash-completion | ||
doc | ||
include | ||
m4 | ||
scripts | ||
src | ||
tests | ||
tools | ||
.clang-format | ||
.gitignore | ||
abigail.m4 | ||
AUTHORS | ||
ChangeLog | ||
COMMIT-LOG-GUIDELINES | ||
COMPILING | ||
configure.ac | ||
CONTRIBUTING | ||
COPYING | ||
COPYING-GPLV3 | ||
COPYING-LGPLV2 | ||
COPYING-LGPLV3 | ||
default.abignore | ||
gen-changelog.py | ||
install-sh | ||
libabigail.pc.in | ||
ltmain.sh | ||
Makefile.am | ||
NEWS | ||
README | ||
release-text-template.txt | ||
update-copyright.sh | ||
VISIBILITY |
This is the Application Binary Interface Generic Analysis and Instrumentation Library. It aims at constructing, manipulating, serializing and de-serializing ABI-relevant artifacts. The set of artifacts that we are intersted is made of quantities like types, variable, fonctions and declarations of a given library or program. For a given library or program this set of quantities is called an ABI corpus. This library aims at (among other things) providing a way to compare two ABI Corpora (apparently the plural of corpus is copora, heh, that's cool), provide detailed information about their differences, and help build tools to infer interesting conclusions about these differences. You are welcome to contribute to this project after reading the files CONTRIBUTING and COMMIT-LOG-GUIDELINES files in the source tree. Communicating with the maintainers of this project -- including sending patches to be include to the source code -- happens via email at libabigail@sourceware.org.