On 12/12/18 20:13, Alexei Starovoitov wrote: > that won't work either. > "bpf feature set" is a lot more than number of program > and map types the kernel supports. There are all sorts of > helper combinations, hooks, and verifier improvements. > test_verifier.c must test all that. > I don't think there is a way to make usptream test_verfier.c > not to report failure on older kernels. But it's not just older kernels; AIUI there are config options that also affect this. Are you saying that test_verifier should only be expected to run / pass on allyesconfig kernels?
I think that for the cases where we _can_ do it easily (which seems to be precisely things like prog_type which don't require any additional annotation of test cases) we should skip tests that aren't supported by the running kernel. An alternative is to have a whitelist of verifier error messages that all mean "your kernel is missing a feature this program needs" in test_verifier, so that any test case that hits any of them can be marked as skipped. That doesn't cover every possibility (sometimes the same message could be caused by a plain old invalid program) but it might help. -Ed