-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Currently, there's no way of populating runtime configuration variables declared using DECLARE_CONFIG
in verifier tests. This prevents porting over macros like ENABLE_IPV4=1
since they control branching, and the whole point of the verifier tests is having these chunks of code enabled.
This issue is for coming up with and implementing a solution to replace the configuration values in the files in bpf/complexity-tests/*/*/{1,2,etc}.txt
with another mechanism. There's an opportunity to innovate on our approach, automate testing to reduce oversights, potentially increasing verifier test coverage in the process.
For example, given an ELF (bpf_lxc.o) and its config (struct BPFLXC), we could automatically generate all permutations of possible config values (true|false for bools, 0|1|MaxUint16 for u16, etc.) to ensure there can be no verifier errors under certain user configurations. Not sure how this will shake out in practice, but having some form of automation is now possible thanks to config structs.
Initially, a 1:1 port of the existing approach would suffice.