[test] unit testing for bpf programs
Would be great if we have those
@nddq @ibezrukavyi @ritwikranjan I'd like to give this a try. Feel free to assign it to me if it's still open for contributors.
Hey @VigneshSP94 Please let us know what you plan on doing
@ritwikranjan Currently, by observing dropreason_linux_test.go as example -
1 - It tests compiling the dropreason.c to an object file and see if the object file exists. 2 - It tests the processing of the Map that it gets from the ebpf program. so on.. so forth
I'm thinking that, the current test framework could be extended to directly test bpf program behaviour using the cilium/ebpf Test() functionality and create tests that verify the actual behavior of bpf programs with simulated inputs.
Starting with the dropreason plugin's bpf programs and expanding to others. I can start with this if OK.
The idea sounds good to me