/linux/tools/testing/selftests/landlock/ |
H A D | base_test.c | 34 ASSERT_EQ(-1, landlock_create_ruleset(ruleset_attr, 0, 0)); in TEST() 36 ASSERT_EQ(EINVAL, errno); in TEST() 37 ASSERT_EQ(-1, landlock_create_ruleset(ruleset_attr, 1, 0)); in TEST() 38 ASSERT_EQ(EINVAL, errno); in TEST() 39 ASSERT_EQ(-1, landlock_create_ruleset(ruleset_attr, 7, 0)); in TEST() 40 ASSERT_EQ(EINVAL, errno); in TEST() 42 ASSERT_EQ(-1, landlock_create_ruleset(NULL, 1, 0)); in TEST() 44 ASSERT_EQ(EFAULT, errno); in TEST() 46 ASSERT_EQ(-1, landlock_create_ruleset( in TEST() 48 ASSERT_EQ(EFAULT, errno); in TEST() [all …]
|
H A D | fs_test.c | 205 ASSERT_EQ(0, mkdir(path, 0700)) in create_directory() 216 ASSERT_EQ(0, mknod(path, S_IFREG | 0700, 0)) in create_file() 289 ASSERT_EQ(0, unshare(CLONE_NEWNS | CLONE_NEWCGROUP)); in prepare_layout_opt() 290 ASSERT_EQ(0, mount_opt(mnt, TMP_DIR)) in prepare_layout_opt() 302 ASSERT_EQ(0, mount(NULL, TMP_DIR, NULL, MS_PRIVATE | MS_REC, NULL)); in prepare_layout_opt() 321 ASSERT_EQ(EINVAL, errno); in cleanup_layout() 358 ASSERT_EQ(0, mount_opt(&mnt_tmp, dir_s3d2)); in create_layout1() 361 ASSERT_EQ(0, mkdir(dir_s3d3, 0700)); in create_layout1() 435 ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY)); in TEST_F_FORK() 436 ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY)); in TEST_F_FORK() [all …]
|
H A D | scoped_signal_test.c | 91 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 110 ASSERT_EQ(0, err); in TEST_F() 111 ASSERT_EQ(1, read(pipe_parent[0], &buf_child, 1)); in TEST_F() 121 ASSERT_EQ(-1, err); in TEST_F() 122 ASSERT_EQ(EPERM, errno); in TEST_F() 128 ASSERT_EQ(0, is_signaled); in TEST_F() 129 ASSERT_EQ(0, raise(variant->sig)); in TEST_F() 130 ASSERT_EQ(1, is_signaled); in TEST_F() 140 ASSERT_EQ(1, is_signaled); in TEST_F() 141 ASSERT_EQ(1, write(pipe_parent[1], ".", 1)); in TEST_F() [all …]
|
H A D | scoped_abstract_unix_test.c | 87 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 113 ASSERT_EQ(1, read(pipe_parent[0], &buf_child, 1)); in TEST_F() 146 ASSERT_EQ(0, bind(stream_server, &self->stream_address.unix_addr, in TEST_F() 148 ASSERT_EQ(0, bind(dgram_server, &self->dgram_address.unix_addr, in TEST_F() 150 ASSERT_EQ(0, listen(stream_server, backlog)); in TEST_F() 153 ASSERT_EQ(1, write(pipe_parent[1], ".", 1)); in TEST_F() 155 ASSERT_EQ(child, waitpid(child, &status, 0)); in TEST_F() 184 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 185 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 205 ASSERT_EQ(1, read(pipe_parent[0], &buf, 1)); in TEST_F() [all …]
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | tracing_struct.c | 23 ASSERT_EQ(skel->bss->t1_a_a, 2, "t1:a.a"); in test_struct_args() 24 ASSERT_EQ(skel->bss->t1_a_b, 3, "t1:a.b"); in test_struct_args() 25 ASSERT_EQ(skel->bss->t1_b, 1, "t1:b"); in test_struct_args() 26 ASSERT_EQ(skel->bss->t1_c, 4, "t1:c"); in test_struct_args() 28 ASSERT_EQ(skel->bss->t1_nregs, 4, "t1 nregs"); in test_struct_args() 29 ASSERT_EQ(skel->bss->t1_reg0, 2, "t1 reg0"); in test_struct_args() 30 ASSERT_EQ(skel->bss->t1_reg1, 3, "t1 reg1"); in test_struct_args() 31 ASSERT_EQ(skel->bss->t1_reg2, 1, "t1 reg2"); in test_struct_args() 32 ASSERT_EQ(skel->bss->t1_reg3, 4, "t1 reg3"); in test_struct_args() 33 ASSERT_EQ(skel->bss->t1_ret, 10, "t1 ret"); in test_struct_args() [all …]
|
H A D | btf_write.c | 18 ASSERT_EQ(str_off, -ENOENT, "int_str_missing_off"); in gen_btf() 21 ASSERT_EQ(str_off, 1, "int_str_off"); in gen_btf() 24 ASSERT_EQ(str_off, 1, "int_str_found_off"); in gen_btf() 28 ASSERT_EQ(id, 1, "int_id"); in gen_btf() 32 ASSERT_EQ(t->name_off, str_off, "int_name_off"); in gen_btf() 34 ASSERT_EQ(btf_kind(t), BTF_KIND_INT, "int_kind"); in gen_btf() 35 ASSERT_EQ(t->size, 4, "int_sz"); in gen_btf() 36 ASSERT_EQ(btf_int_encoding(t), BTF_INT_SIGNED, "int_enc"); in gen_btf() 37 ASSERT_EQ(btf_int_bits(t), 32, "int_bits"); in gen_btf() 56 ASSERT_EQ(id, 2, "ptr_id"); in gen_btf() [all …]
|
H A D | tc_opts.c | 38 ASSERT_EQ(skel->bss->seen_tc1, false, "seen_tc1"); in serial_test_tc_opts_basic() 39 ASSERT_EQ(skel->bss->seen_tc2, false, "seen_tc2"); in serial_test_tc_opts_basic() 42 if (!ASSERT_EQ(err, 0, "prog_attach")) in serial_test_tc_opts_basic() 57 ASSERT_EQ(optq.count, 1, "count"); in serial_test_tc_opts_basic() 58 ASSERT_EQ(optq.revision, 2, "revision"); in serial_test_tc_opts_basic() 59 ASSERT_EQ(optq.prog_ids[0], id1, "prog_ids[0]"); in serial_test_tc_opts_basic() 60 ASSERT_EQ(optq.prog_ids[1], 0, "prog_ids[1]"); in serial_test_tc_opts_basic() 65 ASSERT_EQ(skel->bss->seen_tc1, true, "seen_tc1"); in serial_test_tc_opts_basic() 66 ASSERT_EQ(skel->bss->seen_tc2, false, "seen_tc2"); in serial_test_tc_opts_basic() 69 if (!ASSERT_EQ(err, 0, "prog_attach")) in serial_test_tc_opts_basic() [all …]
|
H A D | usdt.c | 71 ASSERT_EQ(bss->usdt0_called, 1, "usdt0_called"); in subtest_basic_usdt() 72 ASSERT_EQ(bss->usdt3_called, 1, "usdt3_called"); in subtest_basic_usdt() 73 ASSERT_EQ(bss->usdt12_called, 1, "usdt12_called"); in subtest_basic_usdt() 75 ASSERT_EQ(bss->usdt0_cookie, 0xcafedeadbeeffeed, "usdt0_cookie"); in subtest_basic_usdt() 76 ASSERT_EQ(bss->usdt0_arg_cnt, 0, "usdt0_arg_cnt"); in subtest_basic_usdt() 77 ASSERT_EQ(bss->usdt0_arg_ret, -ENOENT, "usdt0_arg_ret"); in subtest_basic_usdt() 80 ASSERT_EQ(bss->usdt3_cookie, 0, "usdt3_cookie"); in subtest_basic_usdt() 81 ASSERT_EQ(bss->usdt3_arg_cnt, 3, "usdt3_arg_cnt"); in subtest_basic_usdt() 83 ASSERT_EQ(bss->usdt3_arg_rets[0], 0, "usdt3_arg1_ret"); in subtest_basic_usdt() 84 ASSERT_EQ(bss->usdt3_arg_rets[1], 0, "usdt3_arg2_ret"); in subtest_basic_usdt() [all …]
|
H A D | tc_netkit.c | 78 ASSERT_EQ(system("ip link set dev " netkit_name in create_netkit() 116 ASSERT_EQ(if_nametoindex(netkit_name), 0, netkit_name "_ifindex"); in __send_icmp() 182 ASSERT_EQ(bpf_program__set_expected_attach_type(skel->progs.tc1, in serial_test_tc_netkit_basic() 184 ASSERT_EQ(bpf_program__set_expected_attach_type(skel->progs.tc2, in serial_test_tc_netkit_basic() 199 ASSERT_EQ(skel->bss->seen_tc1, false, "seen_tc1"); in serial_test_tc_netkit_basic() 200 ASSERT_EQ(skel->bss->seen_tc2, false, "seen_tc2"); in serial_test_tc_netkit_basic() 224 ASSERT_EQ(optq.count, 1, "count"); in serial_test_tc_netkit_basic() 225 ASSERT_EQ(optq.revision, 2, "revision"); in serial_test_tc_netkit_basic() 226 ASSERT_EQ(optq.prog_ids[0], pid1, "prog_ids[0]"); in serial_test_tc_netkit_basic() 227 ASSERT_EQ(opt in serial_test_tc_netkit_basic() [all...] |
H A D | atomics.c | 20 ASSERT_EQ(skel->data->add64_value, 3, "add64_value"); in test_add() 21 ASSERT_EQ(skel->bss->add64_result, 1, "add64_result"); in test_add() 23 ASSERT_EQ(skel->data->add32_value, 3, "add32_value"); in test_add() 24 ASSERT_EQ(skel->bss->add32_result, 1, "add32_result"); in test_add() 26 ASSERT_EQ(skel->bss->add_stack_value_copy, 3, "add_stack_value"); in test_add() 27 ASSERT_EQ(skel->bss->add_stack_result, 1, "add_stack_result"); in test_add() 29 ASSERT_EQ(skel->data->add_noreturn_value, 3, "add_noreturn_value"); in test_add() 45 ASSERT_EQ(skel->data->sub64_value, -1, "sub64_value"); in test_sub() 46 ASSERT_EQ(skel->bss->sub64_result, 1, "sub64_result"); in test_sub() 48 ASSERT_EQ(skel->data->sub32_value, -1, "sub32_value"); in test_sub() [all …]
|
H A D | tc_links.c | 38 ASSERT_EQ(skel->bss->seen_tc1, false, "seen_tc1"); in serial_test_tc_links_basic() 39 ASSERT_EQ(skel->bss->seen_tc2, false, "seen_tc2"); in serial_test_tc_links_basic() 63 ASSERT_EQ(optq.count, 1, "count"); in serial_test_tc_links_basic() 64 ASSERT_EQ(optq.revision, 2, "revision"); in serial_test_tc_links_basic() 65 ASSERT_EQ(optq.prog_ids[0], pid1, "prog_ids[0]"); in serial_test_tc_links_basic() 66 ASSERT_EQ(optq.link_ids[0], lid1, "link_ids[0]"); in serial_test_tc_links_basic() 67 ASSERT_EQ(optq.prog_ids[1], 0, "prog_ids[1]"); in serial_test_tc_links_basic() 68 ASSERT_EQ(optq.link_ids[1], 0, "link_ids[1]"); in serial_test_tc_links_basic() 73 ASSERT_EQ(skel->bss->seen_tc1, true, "seen_tc1"); in serial_test_tc_links_basic() 74 ASSERT_EQ(skel->bss->seen_tc2, false, "seen_tc2"); in serial_test_tc_links_basic() [all …]
|
H A D | test_bpf_syscall_macro.c | 41 ASSERT_EQ(skel->bss->arg1, exp_arg1, "syscall_arg1"); in test_bpf_syscall_macro() 42 ASSERT_EQ(skel->bss->arg2, exp_arg2, "syscall_arg2"); in test_bpf_syscall_macro() 43 ASSERT_EQ(skel->bss->arg3, exp_arg3, "syscall_arg3"); in test_bpf_syscall_macro() 48 ASSERT_EQ(skel->bss->arg4_cx, exp_arg4, "syscall_arg4_from_cx"); in test_bpf_syscall_macro() 50 ASSERT_EQ(skel->bss->arg4, exp_arg4, "syscall_arg4"); in test_bpf_syscall_macro() 51 ASSERT_EQ(skel->bss->arg5, exp_arg5, "syscall_arg5"); in test_bpf_syscall_macro() 54 ASSERT_EQ(skel->bss->arg1_core, exp_arg1, "syscall_arg1_core_variant"); in test_bpf_syscall_macro() 55 ASSERT_EQ(skel->bss->arg2_core, exp_arg2, "syscall_arg2_core_variant"); in test_bpf_syscall_macro() 56 ASSERT_EQ(skel->bss->arg3_core, exp_arg3, "syscall_arg3_core_variant"); in test_bpf_syscall_macro() 61 ASSERT_EQ(skel->bss->arg4_core_cx, exp_arg4, "syscall_arg4_from_cx_core_variant"); in test_bpf_syscall_macro() [all …]
|
H A D | tc_bpf.c | 41 if (!ASSERT_EQ(opts.handle, 1, "handle set") || in test_tc_bpf_basic() 42 !ASSERT_EQ(opts.priority, 1, "priority set") || in test_tc_bpf_basic() 43 !ASSERT_EQ(opts.prog_id, info.id, "prog_id set")) in test_tc_bpf_basic() 57 if (!ASSERT_EQ(opts.handle, 1, "handle set") || in test_tc_bpf_basic() 58 !ASSERT_EQ(opts.priority, 1, "priority set") || in test_tc_bpf_basic() 59 !ASSERT_EQ(opts.prog_id, info.id, "prog_id set")) in test_tc_bpf_basic() 77 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_hook_create invalid hook = NULL")) in test_tc_bpf_api() 82 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_hook_create invalid hook ifindex == 0")) in test_tc_bpf_api() 86 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_hook_destroy invalid hook ifindex == 0")) in test_tc_bpf_api() 90 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_attach invalid hook ifindex == 0")) in test_tc_bpf_api() [all …]
|
H A D | arena_atomics.c | 19 ASSERT_EQ(skel->arena->add64_value, 3, "add64_value"); in test_add() 20 ASSERT_EQ(skel->arena->add64_result, 1, "add64_result"); in test_add() 22 ASSERT_EQ(skel->arena->add32_value, 3, "add32_value"); in test_add() 23 ASSERT_EQ(skel->arena->add32_result, 1, "add32_result"); in test_add() 25 ASSERT_EQ(skel->arena->add_stack_value_copy, 3, "add_stack_value"); in test_add() 26 ASSERT_EQ(skel->arena->add_stack_result, 1, "add_stack_result"); in test_add() 28 ASSERT_EQ(skel->arena->add_noreturn_value, 3, "add_noreturn_value"); in test_add() 44 ASSERT_EQ(skel->arena->sub64_value, -1, "sub64_value"); in test_sub() 45 ASSERT_EQ(skel->arena->sub64_result, 1, "sub64_result"); in test_sub() 47 ASSERT_EQ(skel->arena->sub32_value, -1, "sub32_value"); in test_sub() [all …]
|
H A D | core_autosize.c | 88 ASSERT_EQ(char_id, 1, "char_id"); in test_core_autosize() 90 ASSERT_EQ(short_id, 2, "short_id"); in test_core_autosize() 93 ASSERT_EQ(int_id, 3, "int_id"); in test_core_autosize() 95 ASSERT_EQ(long_long_id, 4, "long_long_id"); in test_core_autosize() 97 ASSERT_EQ(void_ptr_id, 5, "void_ptr_id"); in test_core_autosize() 100 ASSERT_EQ(id, 6, "struct_id"); in test_core_autosize() 174 ASSERT_EQ(out.ptr_samesized, 0x01020304, "ptr_samesized"); in test_core_autosize() 175 ASSERT_EQ(out.val1_samesized, 0x1020304050607080, "val1_samesized"); in test_core_autosize() 176 ASSERT_EQ(out.val2_samesized, 0x0a0b0c0d, "val2_samesized"); in test_core_autosize() 177 ASSERT_EQ(out.val3_samesized, 0xfeed, "val3_samesized"); in test_core_autosize() [all …]
|
/linux/tools/testing/vma/ |
H A D | vma.c | 38 #define ASSERT_EQ(_val1, _val2) ASSERT_TRUE((_val1) == (_val2)) macro 165 ASSERT_EQ(vmg->state, VMA_MERGE_SUCCESS); in try_merge_new_vma() 171 ASSERT_EQ(vmg->state, VMA_MERGE_NOMERGE); in try_merge_new_vma() 249 ASSERT_EQ(vma->vm_start, 0); in test_simple_merge() 250 ASSERT_EQ(vma->vm_end, 0x3000); in test_simple_merge() 251 ASSERT_EQ(vma->vm_pgoff, 0); in test_simple_merge() 252 ASSERT_EQ(vma->vm_flags, flags); in test_simple_merge() 278 ASSERT_EQ(vma, init_vma); in test_simple_modify() 280 ASSERT_EQ(vma->vm_start, 0x1000); in test_simple_modify() 281 ASSERT_EQ(vma->vm_end, 0x2000); in test_simple_modify() [all …]
|
/linux/tools/testing/selftests/mount_setattr/ |
H A D | mount_setattr_test.c | 385 ASSERT_EQ(prepare_unpriv_mountns(), 0); in FIXTURE_SETUP() 390 ASSERT_EQ(mount("testing", "/tmp", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP() 393 ASSERT_EQ(mkdir("/tmp/B", 0777), 0); in FIXTURE_SETUP() 395 ASSERT_EQ(mount("testing", "/tmp/B", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP() 398 ASSERT_EQ(mkdir("/tmp/B/BB", 0777), 0); in FIXTURE_SETUP() 400 ASSERT_EQ(mount("testing", "/tmp/B/BB", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP() 403 ASSERT_EQ(mount("testing", "/mnt", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP() 406 ASSERT_EQ(mkdir("/mnt/A", 0777), 0); in FIXTURE_SETUP() 408 ASSERT_EQ(mount("testing", "/mnt/A", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP() 411 ASSERT_EQ(mkdir("/mnt/A/AA", 0777), 0); in FIXTURE_SETUP() [all …]
|
/linux/tools/testing/memblock/tests/ |
H A D | basic_api.c | 18 ASSERT_EQ(memblock.memory.cnt, 0); in memblock_initialization_check() 19 ASSERT_EQ(memblock.memory.max, EXPECTED_MEMBLOCK_REGIONS); in memblock_initialization_check() 20 ASSERT_EQ(strcmp(memblock.memory.name, "memory"), 0); in memblock_initialization_check() 23 ASSERT_EQ(memblock.reserved.cnt, 0); in memblock_initialization_check() 24 ASSERT_EQ(memblock.memory.max, EXPECTED_MEMBLOCK_REGIONS); in memblock_initialization_check() 25 ASSERT_EQ(strcmp(memblock.reserved.name, "reserved"), 0); in memblock_initialization_check() 27 ASSERT_EQ(memblock.bottom_up, false); in memblock_initialization_check() 28 ASSERT_EQ(memblock.current_limit, MEMBLOCK_ALLOC_ANYWHERE); in memblock_initialization_check() 57 ASSERT_EQ(rgn->base, r.base); in memblock_add_simple_check() 58 ASSERT_EQ(rgn->size, r.size); in memblock_add_simple_check() [all …]
|
H A D | alloc_api.c | 41 ASSERT_EQ(rgn->size, size); in alloc_top_down_simple_check() 42 ASSERT_EQ(rgn->base, expected_start); in alloc_top_down_simple_check() 44 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_top_down_simple_check() 45 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_top_down_simple_check() 99 ASSERT_EQ(rgn1->size, r1.size); in alloc_top_down_disjoint_check() 100 ASSERT_EQ(rgn1->base, r1.base); in alloc_top_down_disjoint_check() 102 ASSERT_EQ(rgn2->size, r2_size); in alloc_top_down_disjoint_check() 103 ASSERT_EQ(rgn2->base, expected_start); in alloc_top_down_disjoint_check() 105 ASSERT_EQ(memblock.reserved.cnt, 2); in alloc_top_down_disjoint_check() 106 ASSERT_EQ(memblock.reserved.total_size, total_size); in alloc_top_down_disjoint_check() [all …]
|
/linux/tools/testing/selftests/user_events/ |
H A D | abi_test.c | 236 ASSERT_EQ(0, self->check); in TEST_F() 237 ASSERT_EQ(0, reg_enable(&self->check, sizeof(int), 0)); in TEST_F() 238 ASSERT_EQ(0, change_event(true)); in TEST_F() 239 ASSERT_EQ(1, self->check); in TEST_F() 240 ASSERT_EQ(0, change_event(false)); in TEST_F() 241 ASSERT_EQ(0, self->check); in TEST_F() 244 ASSERT_EQ(0, change_event(true)); in TEST_F() 245 ASSERT_EQ(1, self->check); in TEST_F() 246 ASSERT_EQ(0, reg_disable(&self->check, 0)); in TEST_F() 247 ASSERT_EQ(0, self->check); in TEST_F() [all …]
|
H A D | ftrace_test.c | 252 ASSERT_EQ(0, ioctl(self->data_fd, DIAG_IOCSREG, ®)); in TEST_F() 253 ASSERT_EQ(0, reg.write_index); in TEST_F() 256 ASSERT_EQ(-1, ioctl(self->data_fd, DIAG_IOCSREG, ®)); in TEST_F() 257 ASSERT_EQ(EADDRINUSE, errno); in TEST_F() 261 ASSERT_EQ(0, ioctl(self->data_fd, DIAG_IOCSREG, ®)); in TEST_F() 262 ASSERT_EQ(0, reg.write_index); in TEST_F() 267 ASSERT_EQ(0, ioctl(self->data_fd, DIAG_IOCSREG, ®)); in TEST_F() 268 ASSERT_EQ(0, reg.write_index); in TEST_F() 273 ASSERT_EQ(-1, ioctl(self->data_fd, DIAG_IOCSREG, ®)); in TEST_F() 274 ASSERT_EQ(EADDRINUSE, errno); in TEST_F() [all …]
|
/linux/tools/testing/selftests/pidfd/ |
H A D | pidfd_wait.c | 79 ASSERT_EQ(WIFEXITED(info.si_status), true); in TEST() 80 ASSERT_EQ(WEXITSTATUS(info.si_status), 0); in TEST() 83 ASSERT_EQ(info.si_signo, SIGCHLD); in TEST() 84 ASSERT_EQ(info.si_code, CLD_EXITED); in TEST() 85 ASSERT_EQ(info.si_pid, parent_tid); in TEST() 104 ASSERT_EQ(pipe(pfd), 0); in TEST() 113 ASSERT_EQ(read(pfd[0], buf, 1), 1); in TEST() 120 ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WSTOPPED, NULL), 0); in TEST() 121 ASSERT_EQ(info.si_signo, SIGCHLD); in TEST() 122 ASSERT_EQ(info.si_code, CLD_STOPPED); in TEST() [all …]
|
/linux/tools/testing/selftests/filesystems/epoll/ |
H A D | epoll_wakeup_test.c | 169 ASSERT_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sfd), 0); in TEST() 175 ASSERT_EQ(epoll_ctl(efd, EPOLL_CTL_ADD, sfd[0], &e), 0); in TEST() 177 ASSERT_EQ(write(sfd[1], "w", 1), 1); in TEST() 200 ASSERT_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sfd), 0); in TEST() 206 ASSERT_EQ(epoll_ctl(efd, EPOLL_CTL_ADD, sfd[0], &e), 0); in TEST() 208 ASSERT_EQ(write(sfd[1], "w", 1), 1); in TEST() 231 ASSERT_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, &sfd[0]), 0); in TEST() 232 ASSERT_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, &sfd[2]), 0); in TEST() 238 ASSERT_EQ(epoll_ctl(efd, EPOLL_CTL_ADD, sfd[0], events), 0); in TEST() 241 ASSERT_EQ(epoll_ctl(efd, EPOLL_CTL_ADD, sfd[2], events), 0); in TEST() [all …]
|
/linux/tools/testing/selftests/hid/ |
H A D | hid_bpf.c | 85 ASSERT_EQ(0, err) TEARDOWN_LOG("could not start udev listener: %d", err); in FIXTURE_SETUP() 189 ASSERT_EQ(self->skel->data->callback_check, 52) TH_LOG("callback_check1"); in TEST_F() 190 ASSERT_EQ(self->skel->data->callback2_check, 52) TH_LOG("callback2_check1"); in TEST_F() 198 ASSERT_EQ(self->skel->data->callback_check, 42) TH_LOG("callback_check1"); in TEST_F() 203 ASSERT_EQ(err, 6) TH_LOG("read_hidraw"); in TEST_F() 204 ASSERT_EQ(buf[0], 1); in TEST_F() 205 ASSERT_EQ(buf[2], 47); in TEST_F() 214 ASSERT_EQ(self->skel->data->callback_check, 47) TH_LOG("callback_check1"); in TEST_F() 219 ASSERT_EQ(err, 6) TH_LOG("read_hidraw"); in TEST_F() 220 ASSERT_EQ(buf[2], 52); in TEST_F() [all …]
|
/linux/tools/testing/selftests/mm/ |
H A D | hmm-tests.c | 162 ASSERT_EQ(ret, 0); in FIXTURE_TEARDOWN() 170 ASSERT_EQ(ret, 0); in FIXTURE_TEARDOWN() 174 ASSERT_EQ(ret, 0); in FIXTURE_TEARDOWN() 330 ASSERT_EQ(ret, 0); in TEST_F() 334 ASSERT_EQ(val, 0); in TEST_F() 338 ASSERT_EQ(ret, 0); in TEST_F() 339 ASSERT_EQ(buffer->cpages, npages); in TEST_F() 340 ASSERT_EQ(buffer->faults, 1); in TEST_F() 345 ASSERT_EQ(ptr[i], 0); in TEST_F() 347 ASSERT_EQ(ptr[i], i); in TEST_F() [all …]
|