/linux/tools/testing/selftests/landlock/ |
A D | fs_test.c | 312 ASSERT_EQ(EBADF, errno); in TEST_F_FORK() 320 ASSERT_EQ(EBADFD, errno); in TEST_F_FORK() 342 ASSERT_EQ(EBADFD, errno); in TEST_F_FORK() 353 ASSERT_EQ(EINVAL, errno); in TEST_F_FORK() 420 ASSERT_EQ(0, err); in TEST_F_FORK() 422 ASSERT_EQ(-1, err); in TEST_F_FORK() 563 ASSERT_EQ(EPERM, errno); in TEST_F_FORK() 611 ASSERT_EQ('.', buf); in TEST_F_FORK() 618 ASSERT_EQ(EBADF, errno); in TEST_F_FORK() 1088 ASSERT_EQ(-1, err); in TEST_F_FORK() [all …]
|
A D | base_test.c | 34 ASSERT_EQ(EINVAL, errno); in TEST() 36 ASSERT_EQ(EINVAL, errno); in TEST() 40 ASSERT_EQ(EFAULT, errno); in TEST() 44 ASSERT_EQ(EFAULT, errno); in TEST() 47 ASSERT_EQ(E2BIG, errno); in TEST() 51 ASSERT_EQ(ENOMSG, errno); in TEST() 53 ASSERT_EQ(ENOMSG, errno); in TEST() 58 ASSERT_EQ(E2BIG, errno); in TEST() 61 ASSERT_EQ(E2BIG, errno); in TEST() 75 ASSERT_EQ(EINVAL, errno); in TEST() [all …]
|
A D | ptrace_test.c | 223 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 224 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 237 ASSERT_EQ(0, close(pipe_parent[1])); in TEST_F() 238 ASSERT_EQ(0, close(pipe_child[0])); in TEST_F() 258 ASSERT_EQ(1, WIFSTOPPED(status)); in TEST_F() 275 ASSERT_EQ(1, write(pipe_child[1], ".", 1)); in TEST_F() 278 ASSERT_EQ(0, raise(SIGSTOP)); in TEST_F() 287 ASSERT_EQ(0, close(pipe_child[1])); in TEST_F() 288 ASSERT_EQ(0, close(pipe_parent[0])); in TEST_F() 304 ASSERT_EQ(1, WIFSTOPPED(status)); in TEST_F() [all …]
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | btf_write.c | 27 ASSERT_EQ(id, 1, "int_id"); in gen_btf() 34 ASSERT_EQ(t->size, 4, "int_sz"); in gen_btf() 55 ASSERT_EQ(id, 2, "ptr_id"); in gen_btf() 63 ASSERT_EQ(id, 3, "const_id"); in gen_btf() 88 ASSERT_EQ(id, 6, "array_id"); in gen_btf() 101 ASSERT_EQ(id, 7, "struct_id"); in gen_btf() 130 ASSERT_EQ(id, 8, "union_id"); in gen_btf() 156 ASSERT_EQ(id, 9, "enum_id"); in gen_btf() 252 ASSERT_EQ(id, 16, "var_id"); in gen_btf() 282 ASSERT_EQ(id, 18, "tag_id"); in gen_btf() [all …]
|
A D | tc_bpf.c | 40 if (!ASSERT_EQ(opts.handle, 1, "handle set") || in test_tc_bpf_basic() 41 !ASSERT_EQ(opts.priority, 1, "priority set") || in test_tc_bpf_basic() 42 !ASSERT_EQ(opts.prog_id, info.id, "prog_id set")) in test_tc_bpf_basic() 56 if (!ASSERT_EQ(opts.handle, 1, "handle set") || in test_tc_bpf_basic() 57 !ASSERT_EQ(opts.priority, 1, "priority set") || in test_tc_bpf_basic() 58 !ASSERT_EQ(opts.prog_id, info.id, "prog_id set")) in test_tc_bpf_basic() 170 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_query invalid hook parent")) in test_tc_bpf_api() 195 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_query invalid hook parent")) in test_tc_bpf_api() 213 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_detach invalid flags set")) in test_tc_bpf_api() 250 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_query invalid flags set")) in test_tc_bpf_api() [all …]
|
A D | atomics.c | 24 ASSERT_EQ(skel->data->add64_value, 3, "add64_value"); in test_add() 25 ASSERT_EQ(skel->bss->add64_result, 1, "add64_result"); in test_add() 27 ASSERT_EQ(skel->data->add32_value, 3, "add32_value"); in test_add() 28 ASSERT_EQ(skel->bss->add32_result, 1, "add32_result"); in test_add() 57 ASSERT_EQ(skel->data->sub64_value, -1, "sub64_value"); in test_sub() 58 ASSERT_EQ(skel->bss->sub64_result, 1, "sub64_result"); in test_sub() 60 ASSERT_EQ(skel->data->sub32_value, -1, "sub32_value"); in test_sub() 61 ASSERT_EQ(skel->bss->sub32_result, 1, "sub32_result"); in test_sub() 121 ASSERT_EQ(skel->data->or32_value, 0x111, "or32_value"); in test_or() 122 ASSERT_EQ(skel->bss->or32_result, 0x110, "or32_result"); in test_or() [all …]
|
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() 178 ASSERT_EQ(out.val4_samesized, 0xb9, "val4_samesized"); in test_core_autosize() 189 ASSERT_EQ(out.val4_downsized, 0xb9, "val4_downsized"); in test_core_autosize() 196 ASSERT_EQ(out.ptr_probed, 0x01020304, "ptr_probed"); in test_core_autosize() 199 ASSERT_EQ(out.val3_probed, 0xfeed, "val3_probed"); in test_core_autosize() [all …]
|
A D | btf_endian.c | 30 ASSERT_EQ(btf__endianness(btf), endian, "endian"); in test_btf_endian() 32 ASSERT_EQ(btf__endianness(btf), swap_endian, "endian"); in test_btf_endian() 44 ASSERT_EQ(btf__endianness(swap_btf), swap_endian, "endian"); in test_btf_endian() 45 ASSERT_EQ(btf__type_cnt(swap_btf), btf__type_cnt(btf), "nr_types"); in test_btf_endian() 56 ASSERT_EQ(bswap_16(hdr->magic), BTF_MAGIC, "btf_magic_swapped"); in test_btf_endian() 57 ASSERT_EQ(raw_sz, swap_raw_sz, "raw_sizes"); in test_btf_endian() 67 ASSERT_EQ(hdr->magic, BTF_MAGIC, "btf_magic_native"); in test_btf_endian() 68 ASSERT_EQ(raw_sz, swap_raw_sz, "raw_sizes"); in test_btf_endian() 87 ASSERT_EQ(btf__endianness(swap_btf), swap_endian, "endian"); in test_btf_endian() 88 ASSERT_EQ(btf__type_cnt(swap_btf), btf__type_cnt(btf), "nr_types"); in test_btf_endian() [all …]
|
A D | tcpbpf_user.c | 29 ASSERT_EQ(result->bytes_received, 501, "bytes_received"); in verify_result() 30 ASSERT_EQ(result->bytes_acked, 1002, "bytes_acked"); in verify_result() 31 ASSERT_EQ(result->data_segs_in, 1, "data_segs_in"); in verify_result() 32 ASSERT_EQ(result->data_segs_out, 1, "data_segs_out"); in verify_result() 33 ASSERT_EQ(result->bad_cb_test_rv, 0x80, "bad_cb_test_rv"); in verify_result() 34 ASSERT_EQ(result->good_cb_test_rv, 0, "good_cb_test_rv"); in verify_result() 35 ASSERT_EQ(result->num_listen, 1, "num_listen"); in verify_result() 38 ASSERT_EQ(result->num_close_events, 3, "num_close_events"); in verify_result() 41 ASSERT_EQ(result->tcp_save_syn, 0, "tcp_save_syn"); in verify_result() 44 ASSERT_EQ(result->tcp_saved_syn, 1, "tcp_saved_syn"); in verify_result() [all …]
|
A D | module_attach.c | 72 ASSERT_EQ(bss->raw_tp_read_sz, READ_SZ, "raw_tp"); in test_module_attach() 73 ASSERT_EQ(bss->raw_tp_bare_write_sz, WRITE_SZ, "raw_tp_bare"); in test_module_attach() 74 ASSERT_EQ(bss->tp_btf_read_sz, READ_SZ, "tp_btf"); in test_module_attach() 75 ASSERT_EQ(bss->fentry_read_sz, READ_SZ, "fentry"); in test_module_attach() 76 ASSERT_EQ(bss->fentry_manual_read_sz, READ_SZ, "fentry_manual"); in test_module_attach() 77 ASSERT_EQ(bss->fexit_read_sz, READ_SZ, "fexit"); in test_module_attach() 78 ASSERT_EQ(bss->fexit_ret, -EIO, "fexit_tet"); in test_module_attach() 79 ASSERT_EQ(bss->fmod_ret_read_sz, READ_SZ, "fmod_ret"); in test_module_attach() 85 ASSERT_EQ(bss->raw_tp_writable_bare_in_val, 1024, "writable_test_in"); in test_module_attach() 86 ASSERT_EQ(bss->raw_tp_writable_bare_out_val, writable_val, in test_module_attach()
|
A D | timer.c | 15 ASSERT_EQ(timer_skel->data->callback_check, 52, "callback_check1"); in timer() 16 ASSERT_EQ(timer_skel->data->callback2_check, 52, "callback2_check1"); in timer() 22 ASSERT_EQ(retval, 0, "test_run"); in timer() 27 ASSERT_EQ(timer_skel->data->callback_check, 42, "callback_check2"); in timer() 28 ASSERT_EQ(timer_skel->data->callback2_check, 42, "callback2_check2"); in timer() 31 ASSERT_EQ(timer_skel->bss->bss_data, 10, "bss_data"); in timer() 34 ASSERT_EQ(timer_skel->bss->err, 0, "err"); in timer() 37 ASSERT_EQ(timer_skel->bss->ok, 1 | 2 | 4, "ok"); in timer()
|
A D | get_func_ip_test.c | 35 ASSERT_EQ(retval, 0, "test_run"); in test_get_func_ip_test() 43 ASSERT_EQ(skel->bss->test1_result, 1, "test1_result"); in test_get_func_ip_test() 44 ASSERT_EQ(skel->bss->test2_result, 1, "test2_result"); in test_get_func_ip_test() 45 ASSERT_EQ(skel->bss->test3_result, 1, "test3_result"); in test_get_func_ip_test() 46 ASSERT_EQ(skel->bss->test4_result, 1, "test4_result"); in test_get_func_ip_test() 47 ASSERT_EQ(skel->bss->test5_result, 1, "test5_result"); in test_get_func_ip_test() 49 ASSERT_EQ(skel->bss->test6_result, 1, "test6_result"); in test_get_func_ip_test() 50 ASSERT_EQ(skel->bss->test7_result, 1, "test7_result"); in test_get_func_ip_test()
|
A D | recursion.c | 22 ASSERT_EQ(skel->bss->pass1, 0, "pass1 == 0"); in test_recursion() 24 ASSERT_EQ(skel->bss->pass1, 1, "pass1 == 1"); in test_recursion() 26 ASSERT_EQ(skel->bss->pass1, 2, "pass1 == 2"); in test_recursion() 28 ASSERT_EQ(skel->bss->pass2, 0, "pass2 == 0"); in test_recursion() 30 ASSERT_EQ(skel->bss->pass2, 1, "pass2 == 1"); in test_recursion() 32 ASSERT_EQ(skel->bss->pass2, 2, "pass2 == 2"); in test_recursion() 38 ASSERT_EQ(prog_info.recursion_misses, 2, "recursion_misses"); in test_recursion()
|
A D | linked_vars.c | 32 ASSERT_EQ(skel->bss->output_bss1, 1000 + 2000 + 3000, "output_bss1"); in test_linked_vars() 33 ASSERT_EQ(skel->bss->output_bss2, 1000 + 2000 + 3000, "output_bss2"); in test_linked_vars() 35 ASSERT_EQ(skel->bss->output_data1, 1 + 2 + 10, "output_bss1"); in test_linked_vars() 36 ASSERT_EQ(skel->bss->output_data2, 1 + 2 + 10, "output_bss2"); in test_linked_vars() 38 ASSERT_EQ(skel->bss->output_rodata1, 11 + 22 + 100, "output_weak1"); in test_linked_vars() 39 ASSERT_EQ(skel->bss->output_rodata2, 11 + 22 + 100, "output_weak2"); in test_linked_vars()
|
/linux/tools/testing/selftests/mount_setattr/ |
A D | mount_setattr_test.c | 434 ASSERT_EQ(close(fd), 0); in FIXTURE_SETUP() 497 ASSERT_EQ(errno, EFAULT); in TEST_F() 501 ASSERT_EQ(errno, EINVAL); in TEST_F() 504 ASSERT_EQ(errno, EINVAL); in TEST_F() 508 ASSERT_EQ(errno, EINVAL); in TEST_F() 512 ASSERT_EQ(errno, EINVAL); in TEST_F() 941 ASSERT_EQ(ret, 0); in TEST_F() 980 ASSERT_EQ(errno, EPERM); in TEST_F() 1153 ASSERT_EQ(errno, EPERM); in TEST_F() 1457 ASSERT_EQ(close(fd), 0); in TEST_F() [all …]
|
/linux/tools/testing/selftests/filesystems/epoll/ |
A D | epoll_wakeup_test.c | 177 ASSERT_EQ(write(sfd[1], "w", 1), 1); in TEST() 208 ASSERT_EQ(write(sfd[1], "w", 1), 1); in TEST() 243 ASSERT_EQ(write(sfd[1], "w", 1), 1); in TEST() 244 ASSERT_EQ(write(sfd[3], "w", 1), 1); in TEST() 281 ASSERT_EQ(write(sfd[1], "w", 1), 1); in TEST() 320 ASSERT_EQ(poll(&pfd, 1, 0), 1); in TEST() 325 ASSERT_EQ(poll(&pfd, 1, 0), 1); in TEST() 359 ASSERT_EQ(poll(&pfd, 1, 0), 1); in TEST() 364 ASSERT_EQ(poll(&pfd, 1, 0), 0); in TEST() 3278 ASSERT_EQ(ret, sizeof(v)); in TEST() [all …]
|
/linux/tools/testing/selftests/pidfd/ |
A D | pidfd_wait.c | 84 ASSERT_EQ(info.si_signo, SIGCHLD); in TEST() 86 ASSERT_EQ(info.si_pid, parent_tid); in TEST() 115 ASSERT_EQ(info.si_signo, SIGCHLD); in TEST() 122 ASSERT_EQ(info.si_signo, SIGCHLD); in TEST() 127 ASSERT_EQ(info.si_signo, SIGCHLD); in TEST() 134 ASSERT_EQ(info.si_signo, SIGCHLD); in TEST() 164 ASSERT_EQ(errno, EINVAL); in TEST() 170 ASSERT_EQ(errno, ECHILD); in TEST() 184 ASSERT_EQ(errno, EINVAL); in TEST() 198 ASSERT_EQ(errno, EAGAIN); in TEST() [all …]
|
/linux/tools/testing/selftests/vm/ |
A D | hmm-tests.c | 108 ASSERT_EQ(ret, 0); in FIXTURE_TEARDOWN() 116 ASSERT_EQ(ret, 0); in FIXTURE_TEARDOWN() 120 ASSERT_EQ(ret, 0); in FIXTURE_TEARDOWN() 262 ASSERT_EQ(ret, 0); in TEST_F() 266 ASSERT_EQ(val, 0); in TEST_F() 270 ASSERT_EQ(ret, 0); in TEST_F() 325 ASSERT_EQ(ret, 0); in TEST_F() 333 ASSERT_EQ(ret, 0); in TEST_F() 380 ASSERT_EQ(ret, 0); in TEST_F() 424 ASSERT_EQ(ret, 0); in TEST_F() [all …]
|
/linux/tools/testing/selftests/ptrace/ |
A D | get_syscall_info.c | 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() 160 ASSERT_EQ(expected_none_size, rc) { in TEST() 188 ASSERT_EQ(expected_entry_size, rc) { in TEST() 203 ASSERT_EQ(exp_args[0], info.entry.nr) { in TEST() 206 ASSERT_EQ(exp_args[1], info.entry.args[0]) { in TEST() 228 ASSERT_EQ(expected_exit_size, rc) { in TEST() 243 ASSERT_EQ(exp_param->is_error, in TEST() [all …]
|
A D | vmaccess.c | 43 ASSERT_EQ(f, 0); in TEST() 60 ASSERT_EQ(errno, EAGAIN); in TEST() 61 ASSERT_EQ(k, -1); in TEST() 66 ASSERT_EQ(WIFEXITED(s), 1); in TEST() 70 ASSERT_EQ(k, 0); in TEST() 72 ASSERT_EQ(k, pid); in TEST() 76 ASSERT_EQ(k, 0); in TEST() 78 ASSERT_EQ(k, pid); in TEST() 79 ASSERT_EQ(WIFEXITED(s), 1); in TEST() 82 ASSERT_EQ(k, -1); in TEST() [all …]
|
/linux/tools/testing/selftests/seccomp/ |
A D | seccomp_bpf.c | 425 ASSERT_EQ(0, ret); in TEST() 462 ASSERT_EQ(0, ret); in TEST() 468 ASSERT_EQ(0, ret); in TEST() 496 ASSERT_EQ(0, ret); in TEST() 499 ASSERT_EQ(0, ret); in TEST() 519 ASSERT_EQ(0, ret); in TEST() 525 ASSERT_EQ(0, ret); in TEST() 544 ASSERT_EQ(0, ret); in TEST() 547 ASSERT_EQ(0, ret); in TEST() 561 ASSERT_EQ(0, ret); in TEST() [all …]
|
/linux/tools/testing/selftests/mincore/ |
A D | mincore_selftest.c | 100 ASSERT_EQ(0, retval); in TEST() 101 ASSERT_EQ(0, vec[0]) { in TEST() 109 ASSERT_EQ(0, retval); in TEST() 110 ASSERT_EQ(1, vec[0]) { in TEST() 121 ASSERT_EQ(0, retval); in TEST() 122 ASSERT_EQ(0, vec[0]) { in TEST() 159 ASSERT_EQ(0, retval); in TEST() 160 ASSERT_EQ(0, vec[0]) { in TEST() 167 ASSERT_EQ(0, retval); in TEST() 231 ASSERT_EQ(0, retval); in TEST() [all …]
|
/linux/tools/testing/selftests/kvm/x86_64/ |
A D | tsc_msrs_test.c | 103 ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), val); in main() 104 ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main() 109 ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), val); in main() 110 ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main() 115 ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), val); in main() 116 ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main() 123 ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), HOST_ADJUST + val); in main() 124 ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main() 135 ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main() 144 ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main() [all …]
|
A D | xen_vmcall_test.c | 115 ASSERT_EQ(run->xen.type, KVM_EXIT_XEN_HCALL); in main() 116 ASSERT_EQ(run->xen.u.hcall.cpl, 0); in main() 117 ASSERT_EQ(run->xen.u.hcall.longmode, 1); in main() 118 ASSERT_EQ(run->xen.u.hcall.input, INPUTVALUE); in main() 119 ASSERT_EQ(run->xen.u.hcall.params[0], ARGVALUE(1)); in main() 120 ASSERT_EQ(run->xen.u.hcall.params[1], ARGVALUE(2)); in main() 121 ASSERT_EQ(run->xen.u.hcall.params[2], ARGVALUE(3)); in main() 122 ASSERT_EQ(run->xen.u.hcall.params[3], ARGVALUE(4)); in main() 123 ASSERT_EQ(run->xen.u.hcall.params[4], ARGVALUE(5)); in main() 124 ASSERT_EQ(run->xen.u.hcall.params[5], ARGVALUE(6)); in main()
|
/linux/tools/testing/selftests/syscall_user_dispatch/ |
A D | sud_test.c | 66 ASSERT_EQ(0, ret); in TEST_SIGNAL() 69 ASSERT_EQ(0, ret) { in TEST_SIGNAL() 90 ASSERT_EQ(EINVAL, errno); in TEST() 182 ASSERT_EQ(0, ret); in TEST() 188 ASSERT_EQ(0, ret) { in TEST() 213 ASSERT_EQ(0, si_errno) { in TEST() 238 ASSERT_EQ(0, ret); in TEST_SIGNAL() 244 ASSERT_EQ(0, ret) { in TEST_SIGNAL() 268 ASSERT_EQ(0, ret) { in TEST() 300 ASSERT_EQ(0, ret) { in TEST() [all …]
|