elastic / ebpf

Elastic's eBPF
Other
67 stars 11 forks source link

Refactor ebpf test runner #208

Closed fearful-symmetry closed 1 month ago

fearful-symmetry commented 2 months ago

How to run tests

This completely refactors the go testrunner for EventsTrace. This has a number of advantages:

This also fixes a few known bugs, and probably many more:

In addition, I fixed a few bugs in the tests that I ran into while refactoring:

How to run tests

make testbins #make the test binaries in testing/test_bins
cd testing/testrunner
go test -c #compile the test in advance, so we don't need root to have a go environment
# run all tests
sudo ./testrunner.test
# run a single test
sudo ./testrunner.test -test.run TestEbpf/Tcpv6ConnectionClose -test.v

Known issues with individual tests: