This patch adds initial version of bpf-vmtest-tool script to test BPF programs 
on live kernel

For now, the tool is standalone, but it is intended to be integrated with the
DejaGnu testsuite to run BPF testcases in future patches.

Current Limitations:
- Only x86_64 is supported. Support for additional architectures will be added 
soon.
- When testing BPF programs with --bpf-src or --bpf-obj, only the host's root
  directory can be used as the VM root filesystem. This will also be improved
  in future updates.

Changes since v1:
- Added support for Python 3.9
- Introduced BPF_CFLAGS and other environment flags (see README)
- Added "bpf" directory prefix
- Removed dependency on the uv binary and uv-specific files
- Fixed typo in README

Thank you,
Piyush Raj

Piyush Raj (1):
  contrib: add bpf-vmtest-tool to test BPF programs

 contrib/bpf-vmtest-tool/.gitignore        |  23 +++
 contrib/bpf-vmtest-tool/README            |  78 ++++++++
 contrib/bpf-vmtest-tool/bpf.py            | 189 +++++++++++++++++++
 contrib/bpf-vmtest-tool/config.py         |  18 ++
 contrib/bpf-vmtest-tool/kernel.py         | 209 ++++++++++++++++++++++
 contrib/bpf-vmtest-tool/main.py           | 101 +++++++++++
 contrib/bpf-vmtest-tool/pyproject.toml    |  36 ++++
 contrib/bpf-vmtest-tool/tests/test_cli.py | 167 +++++++++++++++++
 contrib/bpf-vmtest-tool/utils.py          |  27 +++
 contrib/bpf-vmtest-tool/vm.py             | 154 ++++++++++++++++
 10 files changed, 1002 insertions(+)
 create mode 100644 contrib/bpf-vmtest-tool/.gitignore
 create mode 100644 contrib/bpf-vmtest-tool/README
 create mode 100644 contrib/bpf-vmtest-tool/bpf.py
 create mode 100644 contrib/bpf-vmtest-tool/config.py
 create mode 100644 contrib/bpf-vmtest-tool/kernel.py
 create mode 100644 contrib/bpf-vmtest-tool/main.py
 create mode 100644 contrib/bpf-vmtest-tool/pyproject.toml
 create mode 100644 contrib/bpf-vmtest-tool/tests/test_cli.py
 create mode 100644 contrib/bpf-vmtest-tool/utils.py
 create mode 100644 contrib/bpf-vmtest-tool/vm.py

-- 
2.50.0

Reply via email to