8000 GitHub - FedeDP/bpfvalidator
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

FedeDP/bpfvalidator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bpfvalidator

This is a simple tool that spawns qemu machines to test a specific binary on these machines. This is particularly useful for testing eBPF programs against different kernel versions. Under the hood it uses virtme-ng tool to create qemu instancies. Given this configuration file:

vng_path: "vng" # absolute path or should be in PATH
bin_command: "/usr/bin/echo 'hey'" # command to run in the qemu machines
parallel: 1 # number of parallel qemu machines to spawn
out_path: "" # if provided, the report will be saved in this file
kernel_versions:
    - v5.4.293
    - v5.10.237
    - v5.15.182

bpfvalidator will:

  • create 3 qemu machines with the kernel versions specified in the configuration file
  • run the command /usr/bin/true in each of them
  • wait for the command to finish
  • collect the output of the command
  • generate a report telling if the command passed or failed
bpfvalidator --config config.yaml
Report:
- v5.4.293 🟢
- v5.10.237 🟢
- v5.15.182 🟢

it is possible to obtain also a verbose version of the report using --log debug flag:

bpfvalidator --config config.yaml --log debug
Report:
- v5.4.293 🟢
        message: hey

- v5.10.237 🟢
        message: hey

- v5.15.182 🟢
        message: hey

Report

  • 🟢: the command passed
  • 🔴: the command failed
  • 🟡: the provided machine doesn't exist

Example

- v7.9.0 🟡 #the provided machine doesn't exists
- v5.10.237 🟢 # success
- v5.15.182 🔴 # failure

Build and run

go build .
./bpfvalidator

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%
0