OSDN Git Service

selftests/bpf: make flow dissector tests more extensible
authorStanislav Fomichev <sdf@google.com>
Fri, 12 Apr 2019 23:43:10 +0000 (16:43 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 16 Apr 2019 08:21:12 +0000 (10:21 +0200)
commita5cb33464e53482ecc645b4b7703f5b6d151095f
tree28b8b267cd408da8d001b1edca8aa25da19398d8
parent08de198c95438fcbfad7bc06121176794ec92c6e
selftests/bpf: make flow dissector tests more extensible

Rewrite selftest to iterate over an array with input packet and
expected flow_keys. This should make it easier to extend this test
with additional cases without too much boilerplate.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/prog_tests/flow_dissector.c