criu/test/zdtm/lib
Abhishek Vijeev 97ab725db1 zdtm: adding BPF helper functions as a new library
This commit adds BPF helper functions needed by tests in a new library.
It defines new functions that allow verifying BPF map meta-data from
the procfs as well as using the bpf() system call with
BPF_OBJ_GET_INFO_BY_FD. It is necessary to verify from procfs and using
BPF_OBJ_GET_INFO_BY_FD because the information available from both
these places is disjoint (for example, checking whether a map is frozen
cannot be performed with BPF_OBJ_GET_INFO_BY_FD).

Source files modified:

* test/zdtm/lib/Makefile - Generating build artifacts

Source files added:

* test/zdtm/lib/bpfmap_zdtm.c - Provides definitions for 3 new
functions:
    (a) parse_bpfmap_fdinfo() - Parses information about the BPF map
    from procfs
    (b) cmp_bpf_map_info() - Compares the attributes of a BPF map file
    obtained from BPF_OBJ_GET_INFO_BY_FD. This function is typically
    used to verify that the attributes of a BPF map remain the same
    before checkpoint and after restore
    (c) cmp_bpfmap_fdinfo() - Compares the attributes of a BPF map file
    obtained from procfs. This function is typically used to verify
    that the attributes of a BPF map remain the same before checkpoint
    and after restore

* test/zdtm/lib/bpfmap_zdtm.h - Structure and function declarations.
Declares struct bpfmap_fdinfo_obj, which stores information about BPF
maps parsed from procfs

Signed-off-by: Abhishek Vijeev <abhishek.vijeev@gmail.com>
2020-10-20 00:18:24 -07:00
..
arch mips:support docker-cross compile 2020-10-20 00:18:24 -07:00
bpfmap_zdtm.c zdtm: adding BPF helper functions as a new library 2020-10-20 00:18:24 -07:00
bpfmap_zdtm.h zdtm: adding BPF helper functions as a new library 2020-10-20 00:18:24 -07:00
cpuid.h zdtm: Add cpuid.h 2012-12-21 17:35:44 +04:00
datagen.c zdtm: avoid arithmetic overflow in datagen and datachk 2017-10-22 06:34:53 +03:00
fs.c zdtm: Implemented get_current_dir_name wrapper that checks for 'x' permissions 2020-03-27 19:36:20 +03:00
fs.h zdtm: Implemented get_current_dir_name wrapper that checks for 'x' permissions 2020-03-27 19:36:20 +03:00
groups.c zdtm: Get dir of init.pid file 2016-03-09 12:49:52 +03:00
groups.desc zdtm.py: The groups_test class for running groups 2015-12-08 14:54:52 +03:00
lock.c zdtm: rely on -D_GNU_SOURCE passed from Makefiles 2017-04-11 09:01:08 +03:00
lock.h zdtm/lib: Check EWOULDBLOCK in errno instead of -EWOULDBLOCK 2018-07-09 18:26:49 +03:00
Makefile zdtm: adding BPF helper functions as a new library 2020-10-20 00:18:24 -07:00
msg.c Android NDK: __errno is already defined as a function 2019-04-20 20:25:26 -07:00
ns.c zdtm: add support for time namespaces 2020-04-25 00:43:23 -07:00
ns.h zdtm/lib: add pre-dump-notify test flag 2018-07-09 18:26:50 +03:00
parseargs.c zdtm: Make test_{doc,author} weak variables 2020-02-16 09:15:15 -08:00
parseargs.sh zdtm: Zero Downtime Migration Test Suite 2011-12-02 17:49:08 +04:00
stop_and_chk.sh zdtm: Zero Downtime Migration Test Suite 2011-12-02 17:49:08 +04:00
streamutil.c zdtm: lib: add {read,write}_data helpers 2017-12-12 09:12:44 +03:00
sysctl.c zdtm: sysctl net.unix.max_dgram_qlen value preservation test 2020-02-04 12:39:05 -08:00
sysctl.h zdtm: sysctl net.unix.max_dgram_qlen value preservation test 2020-02-04 12:39:05 -08:00
tcp.c tcp: add a separate test for listen sockets 2020-10-20 00:18:24 -07:00
test.c mips:support docker-cross compile 2020-10-20 00:18:24 -07:00
unix.c zdtm: Use safe helper function to initialize unix socket sockaddr structure 2020-03-27 19:36:20 +03:00
zdtmtst.h tcp: add a separate test for listen sockets 2020-10-20 00:18:24 -07:00