mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-19 01:26:22 +00:00
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>
|
||
|---|---|---|
| .. | ||
| arch | ||
| bpfmap_zdtm.c | ||
| bpfmap_zdtm.h | ||
| cpuid.h | ||
| datagen.c | ||
| fs.c | ||
| fs.h | ||
| groups.c | ||
| groups.desc | ||
| lock.c | ||
| lock.h | ||
| Makefile | ||
| msg.c | ||
| ns.c | ||
| ns.h | ||
| parseargs.c | ||
| parseargs.sh | ||
| stop_and_chk.sh | ||
| streamutil.c | ||
| sysctl.c | ||
| sysctl.h | ||
| tcp.c | ||
| test.c | ||
| unix.c | ||
| zdtmtst.h | ||