ee96027445
* 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.
7 lines
158 B
Bash
Executable File
7 lines
158 B
Bash
Executable File
#!/bin/sh -efu
|
|
|
|
. "${srcdir=.}/scno_tampering.sh"
|
|
|
|
run_strace -a20 -v -e trace=bpf -e inject=bpf:retval=42 ../bpf-success-v > "$EXP"
|
|
match_diff "$LOG" "$EXP"
|