Lines Matching refs:CHECK
37 if (CHECK(skel, "bpf_iter_test_kern3__open_and_load", in test_btf_id_or_null()
55 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in do_dummy_read()
61 CHECK(len < 0, "read", "read failed: %s\n", strerror(errno)); in do_dummy_read()
90 if (CHECK(!skel, "bpf_iter_ipv6_route__open_and_load", in test_ipv6_route()
104 if (CHECK(!skel, "bpf_iter_netlink__open_and_load", in test_netlink()
118 if (CHECK(!skel, "bpf_iter_bpf_map__open_and_load", in test_bpf_map()
132 if (CHECK(!skel, "bpf_iter_task__open_and_load", in test_task()
146 if (CHECK(!skel, "bpf_iter_task_stack__open_and_load", in test_task_stack()
168 if (CHECK(!skel, "bpf_iter_task_file__open_and_load", in test_task_file()
174 if (CHECK(pthread_create(&thread_id, NULL, &do_nothing, NULL), in test_task_file()
180 if (CHECK(pthread_join(thread_id, &ret) || ret != NULL, in test_task_file()
184 CHECK(skel->bss->count != 0, "check_count", in test_task_file()
209 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in do_btf_read()
220 if (CHECK(err < 0, "read", "read failed: %s\n", strerror(errno))) in do_btf_read()
223 CHECK(strstr(taskbuf, "(struct task_struct)") == NULL, in do_btf_read()
240 if (CHECK(!skel, "bpf_iter_task_btf__open_and_load", in test_task_btf()
250 if (CHECK(bss->tasks == 0, "check if iterated over tasks", in test_task_btf()
254 CHECK(bss->seq_err != 0, "check for unexpected err", in test_task_btf()
266 if (CHECK(!skel, "bpf_iter_tcp4__open_and_load", in test_tcp4()
280 if (CHECK(!skel, "bpf_iter_tcp6__open_and_load", in test_tcp6()
294 if (CHECK(!skel, "bpf_iter_udp4__open_and_load", in test_udp4()
308 if (CHECK(!skel, "bpf_iter_udp6__open_and_load", in test_udp6()
341 if (CHECK(start >= 16, "read", "read len %d\n", len)) in do_read_with_fd()
345 if (CHECK(len < 0, "read", "read failed: %s\n", strerror(errno))) in do_read_with_fd()
349 if (CHECK(err, "read", "incorrect read result: buf %s, expected %s\n", in do_read_with_fd()
363 if (CHECK(!skel, "bpf_iter_test_kern1__open_and_load", in test_anon_iter()
368 if (CHECK(err, "bpf_iter_test_kern1__attach", in test_anon_iter()
375 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in test_anon_iter()
390 if (CHECK(iter_fd < 0, "open", "open %s failed: %s\n", in do_read()
408 if (CHECK(!skel1, "bpf_iter_test_kern1__open_and_load", in test_file_iter()
420 if (CHECK(err, "pin_iter", "pin_iter to %s failed: %d\n", path, err)) in test_file_iter()
432 if (CHECK(!skel2, "bpf_iter_test_kern2__open_and_load", in test_file_iter()
437 if (CHECK(err, "update_prog", "update_prog failed\n")) in test_file_iter()
463 if (CHECK(!skel, "bpf_iter_test_kern4__open", in test_overflow()
473 if (CHECK(map1_fd < 0, "bpf_create_map", in test_overflow()
477 if (CHECK(map2_fd < 0, "bpf_create_map", in test_overflow()
500 if (CHECK(bpf_iter_test_kern4__load(skel), in test_overflow()
507 if (CHECK(err, "get_map_info", "get map info failed: %s\n", in test_overflow()
513 if (CHECK(err, "get_map_info", "get map info failed: %s\n", in test_overflow()
523 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in test_overflow()
536 CHECK(len != -1 || errno != E2BIG, "read", in test_overflow()
544 if (CHECK(len < 0, "read", "read failed: %s\n", in test_overflow()
554 if (CHECK(len < 0, "read", "read failed: %s\n", in test_overflow()
559 if (CHECK(total_read_len != expected_read_len, "read", in test_overflow()
564 if (CHECK(skel->bss->map1_accessed != 1, "map1_accessed", in test_overflow()
568 if (CHECK(skel->bss->map2_accessed != 2, "map2_accessed", in test_overflow()
572 CHECK(skel->bss->map2_seqnum1 != skel->bss->map2_seqnum2, in test_overflow()
607 if (CHECK(!skel, "bpf_iter_bpf_hash_map__open", in test_bpf_hash_map()
614 if (CHECK(!skel, "bpf_iter_bpf_hash_map__load", in test_bpf_hash_map()
644 if (CHECK(err, "map_update", "map_update failed\n")) in test_bpf_hash_map()
654 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in test_bpf_hash_map()
660 if (CHECK(len < 0, "read", "read failed: %s\n", strerror(errno))) in test_bpf_hash_map()
664 if (CHECK(skel->bss->key_sum_a != expected_key_a, in test_bpf_hash_map()
668 if (CHECK(skel->bss->key_sum_b != expected_key_b, in test_bpf_hash_map()
672 if (CHECK(skel->bss->val_sum != expected_val, in test_bpf_hash_map()
705 if (CHECK(!skel, "bpf_iter_bpf_percpu_hash_map__open", in test_bpf_percpu_hash_map()
712 if (CHECK(!skel, "bpf_iter_bpf_percpu_hash_map__load", in test_bpf_percpu_hash_map()
731 if (CHECK(err, "map_update", "map_update failed\n")) in test_bpf_percpu_hash_map()
744 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in test_bpf_percpu_hash_map()
750 if (CHECK(len < 0, "read", "read failed: %s\n", strerror(errno))) in test_bpf_percpu_hash_map()
754 if (CHECK(skel->bss->key_sum_a != expected_key_a, in test_bpf_percpu_hash_map()
758 if (CHECK(skel->bss->key_sum_b != expected_key_b, in test_bpf_percpu_hash_map()
762 if (CHECK(skel->bss->val_sum != expected_val, in test_bpf_percpu_hash_map()
788 if (CHECK(!skel, "bpf_iter_bpf_array_map__open_and_load", in test_bpf_array_map()
802 if (CHECK(err, "map_update", "map_update failed\n")) in test_bpf_array_map()
815 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in test_bpf_array_map()
822 if (CHECK(len < 0, "read", "read failed: %s\n", strerror(errno))) in test_bpf_array_map()
828 if (CHECK(res_first_key != 0 || res_first_val != first_val, in test_bpf_array_map()
835 if (CHECK(skel->bss->key_sum != expected_key, in test_bpf_array_map()
839 if (CHECK(skel->bss->val_sum != expected_val, in test_bpf_array_map()
846 if (CHECK(err, "map_lookup", "map_lookup failed\n")) in test_bpf_array_map()
848 if (CHECK(i != val, "invalid_val", in test_bpf_array_map()
876 if (CHECK(!skel, "bpf_iter_bpf_percpu_array_map__open", in test_bpf_percpu_array_map()
883 if (CHECK(!skel, "bpf_iter_bpf_percpu_array_map__load", in test_bpf_percpu_array_map()
898 if (CHECK(err, "map_update", "map_update failed\n")) in test_bpf_percpu_array_map()
911 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in test_bpf_percpu_array_map()
917 if (CHECK(len < 0, "read", "read failed: %s\n", strerror(errno))) in test_bpf_percpu_array_map()
921 if (CHECK(skel->bss->key_sum != expected_key, in test_bpf_percpu_array_map()
925 if (CHECK(skel->bss->val_sum != expected_val, in test_bpf_percpu_array_map()
951 if (CHECK(!skel, "bpf_iter_bpf_sk_storage_helpers__open_and_load", in test_bpf_sk_storage_delete()
958 if (CHECK(sock_fd < 0, "socket", "errno: %d\n", errno)) in test_bpf_sk_storage_delete()
961 if (CHECK(err, "map_update", "map_update failed\n")) in test_bpf_sk_storage_delete()
974 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in test_bpf_sk_storage_delete()
980 if (CHECK(len < 0, "read", "read failed: %s\n", strerror(errno))) in test_bpf_sk_storage_delete()
985 if (CHECK(!err || errno != ENOENT, "bpf_map_lookup_elem", in test_bpf_sk_storage_delete()
1012 if (CHECK(!skel, "bpf_iter_bpf_sk_storage_helpers__open_and_load", in test_bpf_sk_storage_get()
1017 if (CHECK(sock_fd < 0, "socket", "errno: %d\n", errno)) in test_bpf_sk_storage_get()
1021 if (CHECK(err != 0, "listen", "errno: %d\n", errno)) in test_bpf_sk_storage_get()
1027 if (CHECK(err, "bpf_map_update_elem", "map_update_failed\n")) in test_bpf_sk_storage_get()
1033 if (CHECK(err || val != getpid(), "bpf_map_lookup_elem", in test_bpf_sk_storage_get()
1041 CHECK(err || val != -getpid(), "bpf_map_lookup_elem", in test_bpf_sk_storage_get()
1063 if (CHECK(!skel, "bpf_iter_bpf_sk_storage_map__open_and_load", in test_bpf_sk_storage_map()
1071 if (CHECK(sock_fd[i] < 0, "socket", "errno: %d\n", errno)) in test_bpf_sk_storage_map()
1079 if (CHECK(err, "map_update", "map_update failed\n")) in test_bpf_sk_storage_map()
1092 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in test_bpf_sk_storage_map()
1098 if (CHECK(len < 0, "read", "read failed: %s\n", strerror(errno))) in test_bpf_sk_storage_map()
1102 if (CHECK(skel->bss->ipv6_sk_count != num_sockets, in test_bpf_sk_storage_map()
1107 if (CHECK(skel->bss->val_sum != expected_val, in test_bpf_sk_storage_map()
1132 if (CHECK(!skel, "bpf_iter_test_kern5__open_and_load", in test_rdonly_buf_out_of_bound()
1152 if (CHECK(skel, "bpf_iter_test_kern6__open_and_load", in test_buf_neg_offset()
1187 if (CHECK(!skel, "bpf_iter_task_vma__open", "skeleton open failed\n")) in test_task_vma()
1193 if (CHECK(err, "bpf_iter_task_vma__load", "skeleton load failed\n")) in test_task_vma()
1205 if (CHECK(iter_fd < 0, "create_iter", "create_iter failed\n")) in test_task_vma()
1216 if (CHECK(err < 0, "read_iter_fd", "read_iter_fd failed\n")) in test_task_vma()
1224 if (CHECK(proc_maps_fd < 0, "open_proc_maps", "open_proc_maps failed\n")) in test_task_vma()
1227 if (CHECK(err < 0, "read_prog_maps_fd", "read_prog_maps_fd failed\n")) in test_task_vma()
1234 CHECK(strcmp(task_vma_output, proc_maps_output), "compare_output", in test_task_vma()