strace/tests/bpf-success-v.c
Eugene Syromyatnikov ee96027445 tests: add union bpf_attr.query.prog_ids field decoding checks
* tests/bpf-success-v.c: New file.
* tests/bpf-success.c: Likewise.
* tests/bpf-success-v.test: New test.
* tests/bpf-success.test: Likewise.
* tests/.gitignore: Add bpf-success and bpf-success-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add bpf-success.test and bpf-success-v.test.
* tests/bpf.c [INJECT_RETVAL] (sys_bpf): Check that retuned value
is equivalent to the injected one; append "(INJECTED)" string to errstr.
(prog_load_ids, prog_load_ids_ptr): New variables.
(init_BPF_PROG_QUERY_attr4, print_BPF_PROG_QUERY_attr4,
init_BPF_PROG_QUERY_attr5, print_BPF_PROG_QUERY_attr5): New functions.
(BPF_PROG_QUERY_checks): Drop "const" qualifier, add new checks.
2018-05-28 17:34:50 +00:00

3 lines
44 B
C

#define INJECT_RETVAL 42
#include "bpf-v.c"