From: Mykyta Yatsenko <yatsenko@xxxxxxxx> To better verify some complex BPF programs by veristat, it would be useful to preset global variables. This patch set implements this functionality and introduces tests for veristat. v2->v3: * Reworked parsing of the presets, using sscanf to split into variable and value, but still use strtoll/strtoull to support range checks when parsing integers * Fix test failures for no_alu32 & cpuv4 by checking if veristat binary is in parent folder * Introduce __CHECK_STR macro for simplifying checks in test * Modify tests into sub-tests Mykyta Yatsenko (2): selftests/bpf: implement setting global variables in veristat selftests/bpf: introduce veristat test tools/testing/selftests/bpf/Makefile | 1 + .../selftests/bpf/prog_tests/test_veristat.c | 136 +++++++++ .../selftests/bpf/progs/set_global_vars.c | 47 +++ tools/testing/selftests/bpf/test_progs.h | 8 + tools/testing/selftests/bpf/veristat.c | 282 ++++++++++++++++++ 5 files changed, 474 insertions(+) create mode 100644 tools/testing/selftests/bpf/prog_tests/test_veristat.c create mode 100644 tools/testing/selftests/bpf/progs/set_global_vars.c -- 2.48.1