summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-05-14 23:12:34 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2019-05-16 01:33:33 +0200
commit3d21b6525caeae45f08e2d3a07ddfdef64882b8b (patch)
treea5d211175346971614c65199afb5eb19c7b561c1 /tools
parentselftests/bpf: add missing \n to flow_dissector CHECK errors (diff)
downloadlinux-3d21b6525caeae45f08e2d3a07ddfdef64882b8b.tar.xz
linux-3d21b6525caeae45f08e2d3a07ddfdef64882b8b.zip
selftests/bpf: add prog detach to flow_dissector test
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 <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/flow_dissector.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
index d40cee07a224..fbd1d88a6095 100644
--- a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
+++ b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
@@ -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);
}