diff --git a/tools/testing/selftests/bpf/prog_tests/static_linked.c b/tools/testing/selftests/bpf/prog_tests/static_linked.c index ab6acbaf9d8cf1e14e1a198ff21216376f93afdf..5c4e3014e063adc9e6f2fb0731300ebae1120f55 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); diff --git a/tools/testing/selftests/bpf/progs/linked_maps1.c b/tools/testing/selftests/bpf/progs/linked_maps1.c index 52291515cc72507fb2c3cecab60bd074eb950c7b..00bf1ca959862b6b892513d8f1e09b0758667942 100644 --- a/tools/testing/selftests/bpf/progs/linked_maps1.c +++ b/tools/testing/selftests/bpf/progs/linked_maps1.c @@ -75,7 +75,7 @@ int BPF_PROG(handler_exit1) val = bpf_map_lookup_elem(&map_weak, &key); if (val) output_weak1 = *val; - + return 0; } diff --git a/tools/testing/selftests/bpf/progs/test_static_linked1.c b/tools/testing/selftests/bpf/progs/test_static_linked1.c index cae304045d9c74eaa34c551de25703c8cf0279ce..4f0b612e166143c99998afee574dbe054651d85c 100644 --- a/tools/testing/selftests/bpf/progs/test_static_linked1.c +++ b/tools/testing/selftests/bpf/progs/test_static_linked1.c @@ -7,7 +7,7 @@ /* 8-byte aligned .data */ static volatile long static_var1 = 2; static volatile int static_var2 = 3; -int var1 = 0; +int var1 = -1; /* 4-byte aligned .rodata */ const volatile int rovar1; diff --git a/tools/testing/selftests/bpf/progs/test_static_linked2.c b/tools/testing/selftests/bpf/progs/test_static_linked2.c index c54c4e865ed80596c4f21a1ded3edf28cfa8bd9f..766ebd502a6072eb8e517a8e1f41b224a6597562 100644 --- a/tools/testing/selftests/bpf/progs/test_static_linked2.c +++ b/tools/testing/selftests/bpf/progs/test_static_linked2.c @@ -7,7 +7,7 @@ /* 4-byte aligned .data */ static volatile int static_var1 = 5; static volatile int static_var2 = 6; -int var2 = 0; +int var2 = -1; /* 8-byte aligned .rodata */ const volatile long rovar2;