]> Git Repo - linux.git/commitdiff
selftests/bpf: add prog detach to flow_dissector test
authorStanislav Fomichev <[email protected]>
Tue, 14 May 2019 21:12:34 +0000 (14:12 -0700)
committerDaniel Borkmann <[email protected]>
Wed, 15 May 2019 23:33:33 +0000 (01:33 +0200)
In case we are not running in a namespace (which we don't do by default),
let's try to detach the bpf program that we use for eth_get_headlen tests.

Fixes: 0905beec9f52 ("selftests/bpf: run flow dissector tests in skb-less mode")
Signed-off-by: Stanislav Fomichev <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
tools/testing/selftests/bpf/prog_tests/flow_dissector.c

index d40cee07a22416c5acd5454177a75bc3bf189f58..fbd1d88a6095325a5273f21b86ec88eae91d8994 100644 (file)
@@ -264,5 +264,6 @@ void test_flow_dissector(void)
                CHECK_FLOW_KEYS(tests[i].name, flow_keys, tests[i].keys);
        }
 
+       bpf_prog_detach(prog_fd, BPF_FLOW_DISSECTOR);
        bpf_object__close(obj);
 }
This page took 0.062827 seconds and 4 git commands to generate.