• John Fastabend's avatar
    bpf: sockmap, add selftests · 16962b24
    John Fastabend authored
    This adds a new test program test_sockmap which is the old sample
    sockmap program. By moving the sample program here we can now run it
    as part of the self tests suite. To support this a populate_progs()
    routine is added to load programs and maps which was previously done
    with load_bpf_file(). This is needed because self test libs do not
    provide a similar routine. Also we now use the cgroup_helpers
    routines to manage cgroup use instead of manually creating one and
    supplying it to the CLI.
    
    Notice we keep the CLI around though because it is useful for dbg
    and specialized testing.
    
    To run use ./test_sockmap and the result should be,
    
    Summary 660 PASSED, 0 SKIPPED, 0 FAILED
    Signed-off-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    16962b24
Makefile 3.11 KB