Home
last modified time | relevance | path

Searched refs:ASSERT_EQ (Results 1 – 25 of 229) sorted by relevance

12345678910

/linux-6.6.21/tools/testing/selftests/landlock/
Dbase_test.c33 ASSERT_EQ(-1, landlock_create_ruleset(ruleset_attr, 0, 0)); in TEST()
35 ASSERT_EQ(EINVAL, errno); in TEST()
36 ASSERT_EQ(-1, landlock_create_ruleset(ruleset_attr, 1, 0)); in TEST()
37 ASSERT_EQ(EINVAL, errno); in TEST()
38 ASSERT_EQ(-1, landlock_create_ruleset(ruleset_attr, 7, 0)); in TEST()
39 ASSERT_EQ(EINVAL, errno); in TEST()
41 ASSERT_EQ(-1, landlock_create_ruleset(NULL, 1, 0)); in TEST()
43 ASSERT_EQ(EFAULT, errno); in TEST()
45 ASSERT_EQ(-1, landlock_create_ruleset( in TEST()
47 ASSERT_EQ(EFAULT, errno); in TEST()
[all …]
Dfs_test.c185 ASSERT_EQ(0, mkdir(path, 0700)) in create_directory()
196 ASSERT_EQ(0, mknod(path, S_IFREG | 0700, 0)) in create_file()
269 ASSERT_EQ(0, unshare(CLONE_NEWNS | CLONE_NEWCGROUP)); in prepare_layout_opt()
270 ASSERT_EQ(0, mount_opt(mnt, TMP_DIR)) in prepare_layout_opt()
282 ASSERT_EQ(0, mount(NULL, TMP_DIR, NULL, MS_PRIVATE | MS_REC, NULL)); in prepare_layout_opt()
330 ASSERT_EQ(0, mount_opt(&mnt_tmp, dir_s3d2)); in create_layout1()
333 ASSERT_EQ(0, mkdir(dir_s3d3, 0700)); in create_layout1()
407 ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY)); in TEST_F_FORK()
408 ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY)); in TEST_F_FORK()
409 ASSERT_EQ(0, test_open(file2_s1d1, O_RDONLY)); in TEST_F_FORK()
[all …]
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/
Dtracing_struct.c22 ASSERT_EQ(skel->bss->t1_a_a, 2, "t1:a.a"); in test_fentry()
23 ASSERT_EQ(skel->bss->t1_a_b, 3, "t1:a.b"); in test_fentry()
24 ASSERT_EQ(skel->bss->t1_b, 1, "t1:b"); in test_fentry()
25 ASSERT_EQ(skel->bss->t1_c, 4, "t1:c"); in test_fentry()
27 ASSERT_EQ(skel->bss->t1_nregs, 4, "t1 nregs"); in test_fentry()
28 ASSERT_EQ(skel->bss->t1_reg0, 2, "t1 reg0"); in test_fentry()
29 ASSERT_EQ(skel->bss->t1_reg1, 3, "t1 reg1"); in test_fentry()
30 ASSERT_EQ(skel->bss->t1_reg2, 1, "t1 reg2"); in test_fentry()
31 ASSERT_EQ(skel->bss->t1_reg3, 4, "t1 reg3"); in test_fentry()
32 ASSERT_EQ(skel->bss->t1_ret, 10, "t1 ret"); in test_fentry()
[all …]
Dbtf_write.c18 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 …]
Dusdt.c71 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 …]
Dtc_opts.c38 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 …]
Datomics.c20 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 …]
Dtc_links.c36 ASSERT_EQ(skel->bss->seen_tc1, false, "seen_tc1"); in serial_test_tc_links_basic()
37 ASSERT_EQ(skel->bss->seen_tc2, false, "seen_tc2"); in serial_test_tc_links_basic()
61 ASSERT_EQ(optq.count, 1, "count"); in serial_test_tc_links_basic()
62 ASSERT_EQ(optq.revision, 2, "revision"); in serial_test_tc_links_basic()
63 ASSERT_EQ(optq.prog_ids[0], pid1, "prog_ids[0]"); in serial_test_tc_links_basic()
64 ASSERT_EQ(optq.link_ids[0], lid1, "link_ids[0]"); in serial_test_tc_links_basic()
65 ASSERT_EQ(optq.prog_ids[1], 0, "prog_ids[1]"); in serial_test_tc_links_basic()
66 ASSERT_EQ(optq.link_ids[1], 0, "link_ids[1]"); in serial_test_tc_links_basic()
71 ASSERT_EQ(skel->bss->seen_tc1, true, "seen_tc1"); in serial_test_tc_links_basic()
72 ASSERT_EQ(skel->bss->seen_tc2, false, "seen_tc2"); in serial_test_tc_links_basic()
[all …]
Dtest_bpf_syscall_macro.c44 ASSERT_EQ(skel->bss->arg1, exp_arg1, "syscall_arg1"); in test_bpf_syscall_macro()
46 ASSERT_EQ(skel->bss->arg2, exp_arg2, "syscall_arg2"); in test_bpf_syscall_macro()
47 ASSERT_EQ(skel->bss->arg3, exp_arg3, "syscall_arg3"); in test_bpf_syscall_macro()
52 ASSERT_EQ(skel->bss->arg4_cx, exp_arg4, "syscall_arg4_from_cx"); in test_bpf_syscall_macro()
54 ASSERT_EQ(skel->bss->arg4, exp_arg4, "syscall_arg4"); in test_bpf_syscall_macro()
55 ASSERT_EQ(skel->bss->arg5, exp_arg5, "syscall_arg5"); in test_bpf_syscall_macro()
58 ASSERT_EQ(skel->bss->arg1_core, exp_arg1, "syscall_arg1_core_variant"); in test_bpf_syscall_macro()
59 ASSERT_EQ(skel->bss->arg2_core, exp_arg2, "syscall_arg2_core_variant"); in test_bpf_syscall_macro()
60 ASSERT_EQ(skel->bss->arg3_core, exp_arg3, "syscall_arg3_core_variant"); in test_bpf_syscall_macro()
65 ASSERT_EQ(skel->bss->arg4_core_cx, exp_arg4, "syscall_arg4_from_cx_core_variant"); in test_bpf_syscall_macro()
[all …]
Dtc_bpf.c41 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 …]
Dcore_autosize.c88 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 …]
Duprobe_autoattach.c40 ASSERT_EQ(skel->bss->uprobe_byname_parm1, 1, "check_uprobe_byname_parm1"); in test_uprobe_autoattach()
41 ASSERT_EQ(skel->bss->uprobe_byname_ran, 1, "check_uprobe_byname_ran"); in test_uprobe_autoattach()
42 ASSERT_EQ(skel->bss->uretprobe_byname_rc, trigger_ret, "check_uretprobe_byname_rc"); in test_uprobe_autoattach()
43 ASSERT_EQ(skel->bss->uretprobe_byname_ret, trigger_ret, "check_uretprobe_byname_ret"); in test_uprobe_autoattach()
44 ASSERT_EQ(skel->bss->uretprobe_byname_ran, 2, "check_uretprobe_byname_ran"); in test_uprobe_autoattach()
45 ASSERT_EQ(skel->bss->uprobe_byname2_parm1, (__u64)(long)devnull_str, in test_uprobe_autoattach()
47 ASSERT_EQ(skel->bss->uprobe_byname2_ran, 3, "check_uprobe_byname2_ran"); in test_uprobe_autoattach()
48 ASSERT_EQ(skel->bss->uretprobe_byname2_rc, (__u64)(long)devnull, in test_uprobe_autoattach()
50 ASSERT_EQ(skel->bss->uretprobe_byname2_ran, 4, "check_uretprobe_byname2_ran"); in test_uprobe_autoattach()
52 ASSERT_EQ(skel->bss->a[0], 1, "arg1"); in test_uprobe_autoattach()
[all …]
Dxdp_adjust_tail.c26 ASSERT_EQ(topts.retval, XDP_DROP, "ipv4 retval"); in test_xdp_adjust_tail_shrink()
34 ASSERT_EQ(topts.retval, XDP_TX, "ipv6 retval"); in test_xdp_adjust_tail_shrink()
35 ASSERT_EQ(topts.data_size_out, expect_sz, "ipv6 size"); in test_xdp_adjust_tail_shrink()
61 ASSERT_EQ(topts.retval, XDP_DROP, "ipv4 retval"); in test_xdp_adjust_tail_grow()
69 ASSERT_EQ(topts.retval, XDP_TX, "ipv6 retval"); in test_xdp_adjust_tail_grow()
70 ASSERT_EQ(topts.data_size_out, expect_sz, "ipv6 size"); in test_xdp_adjust_tail_grow()
108 ASSERT_EQ(errno, ENOSPC, "case-64 errno"); /* Due limit copy_size in bpf_test_finish */ in test_xdp_adjust_tail_grow2()
109 ASSERT_EQ(tattr.retval, XDP_TX, "case-64 retval"); in test_xdp_adjust_tail_grow2()
110 ASSERT_EQ(tattr.data_size_out, 192, "case-64 data_size_out"); /* Expected grow size */ in test_xdp_adjust_tail_grow2()
113 ASSERT_EQ(buf[0], 1, "case-64-data buf[0]"); /* 0-63 memset to 1 */ in test_xdp_adjust_tail_grow2()
[all …]
Dlsm_cgroup.c106 ASSERT_EQ(query_prog_cnt(cgroup_fd, "bpf_lsm_sk_alloc_security"), 0, "prog count"); in test_lsm_cgroup_functional()
107 ASSERT_EQ(query_prog_cnt(cgroup_fd, NULL), 0, "total prog count"); in test_lsm_cgroup_functional()
115 ASSERT_EQ(query_prog_cnt(cgroup_fd, "bpf_lsm_sk_alloc_security"), 1, "prog count"); in test_lsm_cgroup_functional()
116 ASSERT_EQ(query_prog_cnt(cgroup_fd, NULL), 1, "total prog count"); in test_lsm_cgroup_functional()
118 ASSERT_EQ(query_prog_cnt(cgroup_fd, "bpf_lsm_inet_csk_clone"), 0, "prog count"); in test_lsm_cgroup_functional()
122 ASSERT_EQ(query_prog_cnt(cgroup_fd, "bpf_lsm_inet_csk_clone"), 1, "prog count"); in test_lsm_cgroup_functional()
123 ASSERT_EQ(query_prog_cnt(cgroup_fd, NULL), 2, "total prog count"); in test_lsm_cgroup_functional()
127 ASSERT_EQ(query_prog_cnt(cgroup_fd, "bpf_lsm_socket_post_create"), 0, "prog count"); in test_lsm_cgroup_functional()
132 ASSERT_EQ(query_prog_cnt(cgroup_fd, "bpf_lsm_socket_post_create"), 1, "prog count"); in test_lsm_cgroup_functional()
133 ASSERT_EQ(query_prog_cnt(cgroup_fd, NULL), 3, "total prog count"); in test_lsm_cgroup_functional()
[all …]
/linux-6.6.21/tools/testing/selftests/mount_setattr/
Dmount_setattr_test.c385 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-6.6.21/tools/testing/memblock/tests/
Dbasic_api.c18 ASSERT_EQ(memblock.memory.cnt, 1); 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, 1); 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 …]
Dalloc_api.c41 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 …]
Dalloc_helpers_api.c35 ASSERT_EQ(rgn->size, size); in alloc_from_simple_generic_check()
36 ASSERT_EQ(rgn->base, min_addr); in alloc_from_simple_generic_check()
38 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_from_simple_generic_check()
39 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_from_simple_generic_check()
79 ASSERT_EQ(rgn->size, size); in alloc_from_misaligned_generic_check()
80 ASSERT_EQ(rgn->base, memblock_end_of_DRAM() - SMP_CACHE_BYTES); in alloc_from_misaligned_generic_check()
82 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_from_misaligned_generic_check()
83 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_from_misaligned_generic_check()
124 ASSERT_EQ(rgn->size, size); in alloc_from_top_down_high_addr_check()
125 ASSERT_EQ(rgn->base, memblock_end_of_DRAM() - SMP_CACHE_BYTES); in alloc_from_top_down_high_addr_check()
[all …]
Dalloc_nid_api.c87 ASSERT_EQ(rgn->size, size); in alloc_nid_top_down_simple_check()
88 ASSERT_EQ(rgn->base, max_addr - size); in alloc_nid_top_down_simple_check()
89 ASSERT_EQ(rgn_end, max_addr); in alloc_nid_top_down_simple_check()
91 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_nid_top_down_simple_check()
92 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_simple_check()
140 ASSERT_EQ(rgn->size, size); in alloc_nid_top_down_end_misaligned_check()
141 ASSERT_EQ(rgn->base, max_addr - size - misalign); in alloc_nid_top_down_end_misaligned_check()
144 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_nid_top_down_end_misaligned_check()
145 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_end_misaligned_check()
190 ASSERT_EQ(rgn->size, size); in alloc_nid_exact_address_generic_check()
[all …]
/linux-6.6.21/tools/testing/selftests/pidfd/
Dpidfd_wait.c79 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-6.6.21/tools/testing/selftests/user_events/
Dabi_test.c112 ASSERT_EQ(0, self->check); in TEST_F()
113 ASSERT_EQ(0, reg_enable(&self->check, sizeof(int), 0)); in TEST_F()
114 ASSERT_EQ(0, change_event(true)); in TEST_F()
115 ASSERT_EQ(1, self->check); in TEST_F()
116 ASSERT_EQ(0, change_event(false)); in TEST_F()
117 ASSERT_EQ(0, self->check); in TEST_F()
120 ASSERT_EQ(0, change_event(true)); in TEST_F()
121 ASSERT_EQ(1, self->check); in TEST_F()
122 ASSERT_EQ(0, reg_disable(&self->check, 0)); in TEST_F()
123 ASSERT_EQ(0, self->check); in TEST_F()
[all …]
Dftrace_test.c252 ASSERT_EQ(0, ioctl(self->data_fd, DIAG_IOCSREG, &reg)); in TEST_F()
253 ASSERT_EQ(0, reg.write_index); in TEST_F()
256 ASSERT_EQ(-1, ioctl(self->data_fd, DIAG_IOCSREG, &reg)); in TEST_F()
257 ASSERT_EQ(EADDRINUSE, errno); in TEST_F()
261 ASSERT_EQ(0, ioctl(self->data_fd, DIAG_IOCSREG, &reg)); in TEST_F()
262 ASSERT_EQ(0, reg.write_index); in TEST_F()
267 ASSERT_EQ(-1, ioctl(self->data_fd, DIAG_IOCSREG, &reg)); in TEST_F()
268 ASSERT_EQ(EADDRINUSE, errno); in TEST_F()
277 ASSERT_EQ(1 << reg.enable_bit, self->check); in TEST_F()
281 ASSERT_EQ(0, self->check); in TEST_F()
[all …]
/linux-6.6.21/tools/testing/selftests/filesystems/epoll/
Depoll_wakeup_test.c169 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-6.6.21/tools/testing/selftests/mm/
Dhmm-tests.c162 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 …]
/linux-6.6.21/tools/testing/selftests/ptrace/
Dget_syscall_info.c86 ASSERT_EQ(0, sys_ptrace(PTRACE_TRACEME, 0, 0, 0)) { in TEST()
89 ASSERT_EQ(0, kill(pid, SIGSTOP)) { in TEST()
127 ASSERT_EQ(pid, wait(&status)) { in TEST()
133 ASSERT_EQ(0, WEXITSTATUS(status)); in TEST()
148 ASSERT_EQ(0, ptrace_stop) { in TEST()
151 ASSERT_EQ(0, sys_ptrace(PTRACE_SETOPTIONS, pid, 0, in TEST()
160 ASSERT_EQ(expected_none_size, rc) { in TEST()
163 ASSERT_EQ(PTRACE_SYSCALL_INFO_NONE, info.op) { in TEST()
188 ASSERT_EQ(expected_entry_size, rc) { in TEST()
191 ASSERT_EQ(PTRACE_SYSCALL_INFO_ENTRY, info.op) { in TEST()
[all …]

12345678910