diff options
author | Alexei Starovoitov <ast@kernel.org> | 2022-11-22 08:50:04 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-11-22 13:33:56 -0800 |
commit | 0b2971a2703c015b5737d66688c2c7c81a5e391b (patch) | |
tree | eabd27da9f6a31abf98853580aae8088559b50ca /tools/testing/selftests/bpf/progs | |
parent | 68f8e3d4b916531ea3bb8b83e35138cf78f2fce5 (diff) |
Revert "selftests/bpf: Temporarily disable linked list tests"
This reverts commit 0a2f85a1be4328d29aefa54684d10c23a3298fef.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs')
-rw-r--r-- | tools/testing/selftests/bpf/progs/linked_list.c | 11 | ||||
-rw-r--r-- | tools/testing/selftests/bpf/progs/linked_list.h | 2 | ||||
-rw-r--r-- | tools/testing/selftests/bpf/progs/linked_list_fail.c | 16 |
3 files changed, 9 insertions, 20 deletions
diff --git a/tools/testing/selftests/bpf/progs/linked_list.c b/tools/testing/selftests/bpf/progs/linked_list.c index a99103c86e48..2c7b615c6d41 100644 --- a/tools/testing/selftests/bpf/progs/linked_list.c +++ b/tools/testing/selftests/bpf/progs/linked_list.c @@ -291,10 +291,7 @@ int inner_map_list_push_pop(void *ctx) SEC("tc") int global_list_push_pop(void *ctx) { - /* FIXME: - * return test_list_push_pop(&glock, &ghead); - */ - return 0; + return test_list_push_pop(&glock, &ghead); } SEC("tc") @@ -330,13 +327,10 @@ int global_list_push_pop_multiple(void *ctx) { int ret; - /* FIXME: ret = list_push_pop_multiple(&glock, &ghead, false); if (ret) return ret; return list_push_pop_multiple(&glock, &ghead, true); - */ - return 0; } SEC("tc") @@ -370,10 +364,7 @@ int inner_map_list_in_list(void *ctx) SEC("tc") int global_list_in_list(void *ctx) { - /* FIXME return test_list_in_list(&glock, &ghead); - */ - return 0; } char _license[] SEC("license") = "GPL"; diff --git a/tools/testing/selftests/bpf/progs/linked_list.h b/tools/testing/selftests/bpf/progs/linked_list.h index 93157efc2d04..8db80ed64db1 100644 --- a/tools/testing/selftests/bpf/progs/linked_list.h +++ b/tools/testing/selftests/bpf/progs/linked_list.h @@ -47,12 +47,10 @@ struct { }, }; -/* FIXME #define private(name) SEC(".data." #name) __hidden __attribute__((aligned(8))) private(A) struct bpf_spin_lock glock; private(A) struct bpf_list_head ghead __contains(foo, node); private(B) struct bpf_spin_lock glock2; -*/ #endif diff --git a/tools/testing/selftests/bpf/progs/linked_list_fail.c b/tools/testing/selftests/bpf/progs/linked_list_fail.c index 1b7ed1d3a9bb..1d9017240e19 100644 --- a/tools/testing/selftests/bpf/progs/linked_list_fail.c +++ b/tools/testing/selftests/bpf/progs/linked_list_fail.c @@ -59,12 +59,10 @@ CHECK(kptr, push_back, &f->head); CHECK(kptr, pop_front, &f->head); CHECK(kptr, pop_back, &f->head); -/* FIXME CHECK(global, push_front, &ghead); CHECK(global, push_back, &ghead); CHECK(global, pop_front, &ghead); CHECK(global, pop_back, &ghead); -*/ CHECK(map, push_front, &v->head); CHECK(map, push_back, &v->head); @@ -91,15 +89,23 @@ CHECK(inner_map, pop_back, &iv->head); #define CHECK_OP(op) \ CHECK(kptr_kptr, op, &f1->lock, &f2->head); \ + CHECK(kptr_global, op, &f1->lock, &ghead); \ CHECK(kptr_map, op, &f1->lock, &v->head); \ CHECK(kptr_inner_map, op, &f1->lock, &iv->head); \ \ + CHECK(global_global, op, &glock2, &ghead); \ + CHECK(global_kptr, op, &glock, &f1->head); \ + CHECK(global_map, op, &glock, &v->head); \ + CHECK(global_inner_map, op, &glock, &iv->head); \ + \ CHECK(map_map, op, &v->lock, &v2->head); \ CHECK(map_kptr, op, &v->lock, &f2->head); \ + CHECK(map_global, op, &v->lock, &ghead); \ CHECK(map_inner_map, op, &v->lock, &iv->head); \ \ CHECK(inner_map_inner_map, op, &iv->lock, &iv2->head); \ CHECK(inner_map_kptr, op, &iv->lock, &f2->head); \ + CHECK(inner_map_global, op, &iv->lock, &ghead); \ CHECK(inner_map_map, op, &iv->lock, &v->head); CHECK_OP(push_front); @@ -111,7 +117,6 @@ CHECK_OP(pop_back); #undef CHECK_OP #undef INIT -/* FIXME SEC("?kprobe/xyz") int map_compat_kprobe(void *ctx) { @@ -153,7 +158,6 @@ int map_compat_raw_tp_w(void *ctx) bpf_list_push_front(&ghead, NULL); return 0; } -*/ SEC("?tc") int obj_type_id_oor(void *ctx) @@ -299,7 +303,6 @@ int direct_write_node(void *ctx) return 0; } -/* FIXME static __always_inline int write_after_op(void (*push_op)(void *head, void *node)) { @@ -503,7 +506,6 @@ int incorrect_head_var_off2(struct __sk_buff *ctx) return 0; } -*/ SEC("?tc") int incorrect_head_off1(void *ctx) @@ -527,7 +529,6 @@ int incorrect_head_off1(void *ctx) return 0; } -/* FIXME SEC("?tc") int incorrect_head_off2(void *ctx) { @@ -544,7 +545,6 @@ int incorrect_head_off2(void *ctx) return 0; } -*/ static __always_inline int pop_ptr_off(void *(*op)(void *head)) |