From 9e9b451593b161403aedf15eef8ced62dba65f40 Mon Sep 17 00:00:00 2001 From: Andrii Nakryiko Date: Thu, 13 May 2021 16:36:42 -0700 Subject: selftests/bpf: Validate skeleton gen handles skipped fields Adjust static_linked selftests to test a mix of global and static variables and their handling of bpftool's skeleton generation code. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210513233643.194711-1-andrii@kernel.org --- tools/testing/selftests/bpf/prog_tests/static_linked.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/testing/selftests/bpf/prog_tests/static_linked.c') diff --git a/tools/testing/selftests/bpf/prog_tests/static_linked.c b/tools/testing/selftests/bpf/prog_tests/static_linked.c index ab6acbaf9d8c..5c4e3014e063 100644 --- a/tools/testing/selftests/bpf/prog_tests/static_linked.c +++ b/tools/testing/selftests/bpf/prog_tests/static_linked.c @@ -27,8 +27,8 @@ void test_static_linked(void) /* trigger */ usleep(1); - ASSERT_EQ(skel->bss->var1, 1 * 2 + 2 + 3, "var1"); - ASSERT_EQ(skel->bss->var2, 4 * 3 + 5 + 6, "var2"); + ASSERT_EQ(skel->data->var1, 1 * 2 + 2 + 3, "var1"); + ASSERT_EQ(skel->data->var2, 4 * 3 + 5 + 6, "var2"); cleanup: test_static_linked__destroy(skel); -- cgit