mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-8-git-send-email-wangyufen@huawei.com
15 lines
321 B
C
15 lines
321 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <test_progs.h>
|
|
|
|
void test_tcp_estats(void)
|
|
{
|
|
const char *file = "./test_tcp_estats.bpf.o";
|
|
int err, prog_fd;
|
|
struct bpf_object *obj;
|
|
|
|
err = bpf_prog_test_load(file, BPF_PROG_TYPE_TRACEPOINT, &obj, &prog_fd);
|
|
if (!ASSERT_OK(err, ""))
|
|
return;
|
|
|
|
bpf_object__close(obj);
|
|
}
|