summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/tcp_estats.c
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-03-01 19:42:19 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-03-02 11:10:40 -0800
commit886225bb0868fcf763bea62d18e57e4b5ef08a42 (patch)
tree3b643e34c41fc8c294309130f8b0b19b1890c53c /tools/testing/selftests/bpf/prog_tests/tcp_estats.c
parent271a6337cbaedfa9b93006326d0ecc28fd3dc71c (diff)
selftests: bpf: break up test_progs - misc
Move the rest of prog tests into separate files. Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_estats.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/tcp_estats.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_estats.c b/tools/testing/selftests/bpf/prog_tests/tcp_estats.c
new file mode 100644
index 000000000000..bb8759d69099
--- /dev/null
+++ b/tools/testing/selftests/bpf/prog_tests/tcp_estats.c
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <test_progs.h>
+
+void test_tcp_estats(void)
+{
+ const char *file = "./test_tcp_estats.o";
+ int err, prog_fd;
+ struct bpf_object *obj;
+ __u32 duration = 0;
+
+ err = bpf_prog_load(file, BPF_PROG_TYPE_TRACEPOINT, &obj, &prog_fd);
+ CHECK(err, "", "err %d errno %d\n", err, errno);
+ if (err) {
+ error_cnt++;
+ return;
+ }
+
+ bpf_object__close(obj);
+}