/linux-6.12.1/tools/testing/selftests/sgx/ |
D | main.c | 276 EXPECT_EQ((run)->function, EEXIT); \ 295 EXPECT_EQ(ENCL_CALL(&put_op, &self->run, false), 0); in TEST_F() 298 EXPECT_EQ(self->run.user_data, 0); in TEST_F() 303 EXPECT_EQ(ENCL_CALL(&get_op, &self->run, false), 0); in TEST_F() 305 EXPECT_EQ(get_op.value, MAGIC); in TEST_F() 307 EXPECT_EQ(self->run.user_data, 0); in TEST_F() 368 EXPECT_EQ(ENCL_CALL(&put_op, &self->run, false), 0); in TEST_F() 371 EXPECT_EQ(self->run.user_data, 0); in TEST_F() 376 EXPECT_EQ(ENCL_CALL(&get_op, &self->run, false), 0); in TEST_F() 378 EXPECT_EQ(get_op.value, MAGIC); in TEST_F() [all …]
|
/linux-6.12.1/tools/testing/selftests/net/ |
D | tls.c | 205 EXPECT_EQ(cmsg->cmsg_level, SOL_TLS); in tls_recv_cmsg() 206 EXPECT_EQ(cmsg->cmsg_type, TLS_GET_RECORD_TYPE); in tls_recv_cmsg() 208 EXPECT_EQ(ctype, record_type); in tls_recv_cmsg() 239 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F() 241 EXPECT_EQ(memcmp(buf, test_str, send_len), 0); in TEST_F() 250 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F() 254 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F() 258 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F() 262 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F() 266 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F() [all …]
|
D | epoll_busy_poll.c | 66 EXPECT_EQ(0, ret); in FIXTURE_TEARDOWN() 75 EXPECT_EQ(-1, ret) in TEST_F() 78 EXPECT_EQ(ENOTTY, errno) in TEST_F() 85 EXPECT_EQ(-1, ret) in TEST_F() 88 EXPECT_EQ(ENOTTY, errno) in TEST_F() 119 EXPECT_EQ(0, ret); in FIXTURE_TEARDOWN() 141 EXPECT_EQ(0, ret) in TEST_F() 144 EXPECT_EQ(0, self->params.busy_poll_usecs) in TEST_F() 147 EXPECT_EQ(0, self->params.busy_poll_budget) in TEST_F() 150 EXPECT_EQ(0, self->params.prefer_busy_poll) in TEST_F() [all …]
|
D | tun.c | 131 EXPECT_EQ(tun_delete(self->ifname), 0); in TEST_F() 132 EXPECT_EQ(tun_detach(self->fd, self->ifname), -1); in TEST_F() 133 EXPECT_EQ(errno, 22); in TEST_F() 137 EXPECT_EQ(tun_detach(self->fd, self->ifname), 0); in TEST_F() 138 EXPECT_EQ(tun_delete(self->ifname), 0); in TEST_F() 142 EXPECT_EQ(tun_detach(self->fd, self->ifname), 0); in TEST_F() 145 EXPECT_EQ(tun_delete(self->ifname), 0); in TEST_F() 149 EXPECT_EQ(tun_detach(self->fd, self->ifname), 0); in TEST_F() 150 EXPECT_EQ(tun_attach(self->fd, self->ifname), 0); in TEST_F() 151 EXPECT_EQ(tun_delete(self->ifname), 0); in TEST_F() [all …]
|
/linux-6.12.1/tools/testing/selftests/core/ |
D | close_range_test.c | 56 EXPECT_EQ(-1, sys_close_range(open_fds[0], open_fds[100], -1)) { in TEST() 64 EXPECT_EQ(errno, EINVAL); in TEST() 66 EXPECT_EQ(ret, 0); in TEST() 70 EXPECT_EQ(0, sys_close_range(open_fds[0], open_fds[50], 0)); in TEST() 73 EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); in TEST() 86 EXPECT_EQ(0, sys_close_range(open_fds[51], open_fds[92], 0)); in TEST() 89 EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); in TEST() 95 EXPECT_EQ(0, sys_close_range(open_fds[93], open_fds[99], 0)); in TEST() 98 EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); in TEST() 102 EXPECT_EQ(0, sys_close_range(open_fds[100], open_fds[100], 0)); in TEST() [all …]
|
D | unshare_test.c | 53 EXPECT_EQ(0, setrlimit(RLIMIT_NOFILE, &rlimit)) { in TEST() 82 EXPECT_EQ(err, -1) in TEST() 84 EXPECT_EQ(errno, EMFILE) in TEST() 89 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST() 90 EXPECT_EQ(true, WIFEXITED(status)); in TEST() 91 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
|
/linux-6.12.1/tools/testing/selftests/landlock/ |
D | scoped_abstract_unix_test.c | 42 EXPECT_EQ(0, prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)); in create_fs_domain() 43 EXPECT_EQ(0, landlock_restrict_self(ruleset_fd, 0)); in create_fs_domain() 44 EXPECT_EQ(0, close(ruleset_fd)); in create_fs_domain() 102 EXPECT_EQ(0, close(pipe_parent[1])); in TEST_F() 118 EXPECT_EQ(0, err); in TEST_F() 120 EXPECT_EQ(-1, err); in TEST_F() 121 EXPECT_EQ(EPERM, errno); in TEST_F() 123 EXPECT_EQ(0, close(stream_client)); in TEST_F() 128 EXPECT_EQ(0, err); in TEST_F() 130 EXPECT_EQ(-1, err); in TEST_F() [all …]
|
D | net_test.c | 428 EXPECT_EQ(-EINVAL, bind_variant_addrlen(inval_fd, srv, 0)); in test_bind_and_connect() 431 EXPECT_EQ(-EINVAL, bind_variant_addrlen(inval_fd, srv, in test_bind_and_connect() 437 EXPECT_EQ(-EACCES, ret); in test_bind_and_connect() 439 EXPECT_EQ(0, ret) in test_bind_and_connect() 444 EXPECT_EQ(0, close(inval_fd)); in test_bind_and_connect() 451 EXPECT_EQ(-EINVAL, connect_variant_addrlen(inval_fd, srv, 0)); in test_bind_and_connect() 454 EXPECT_EQ(-EINVAL, connect_variant_addrlen(inval_fd, srv, in test_bind_and_connect() 460 EXPECT_EQ(-EINVAL, ret); in test_bind_and_connect() 462 EXPECT_EQ(-EACCES, ret); in test_bind_and_connect() 465 EXPECT_EQ(-ECONNREFUSED, ret); in test_bind_and_connect() [all …]
|
D | scoped_signal_test.c | 95 EXPECT_EQ(0, is_signaled); in TEST_F() 103 EXPECT_EQ(0, close(pipe_parent[1])); in TEST_F() 112 EXPECT_EQ(0, close(pipe_parent[0])); in TEST_F() 135 EXPECT_EQ(0, close(pipe_parent[0])); in TEST_F() 142 EXPECT_EQ(0, close(pipe_parent[1])); in TEST_F() 150 EXPECT_EQ(0, is_signaled); in TEST_F() 196 EXPECT_EQ(0, close(pipe_child[0])); in TEST_F() 197 EXPECT_EQ(0, close(pipe_parent[1])); in TEST_F() 203 EXPECT_EQ(0, close(pipe_child[1])); in TEST_F() 207 EXPECT_EQ(0, close(pipe_parent[0])); in TEST_F() [all …]
|
D | ptrace_test.c | 41 EXPECT_EQ(0, prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)); in create_domain() 42 EXPECT_EQ(0, landlock_restrict_self(ruleset_fd, 0)); in create_domain() 43 EXPECT_EQ(0, close(ruleset_fd)); in create_domain() 338 EXPECT_EQ(0, err_proc_read); in TEST_F() 340 EXPECT_EQ(EACCES, err_proc_read); in TEST_F() 346 EXPECT_EQ(0, ret); in TEST_F() 348 EXPECT_EQ(-1, ret); in TEST_F() 349 EXPECT_EQ(EPERM, errno); in TEST_F() 360 EXPECT_EQ(0, ret); in TEST_F() 362 EXPECT_EQ(-1, ret); in TEST_F() [all …]
|
D | base_test.c | 343 EXPECT_EQ(0, close(dir_fd)); in TEST() 349 EXPECT_EQ(0, prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)); in TEST() 351 EXPECT_EQ(0, close(ruleset_fd)); in TEST() 354 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST() 355 EXPECT_EQ(EACCES, errno); in TEST() 368 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST() 369 EXPECT_EQ(EACCES, errno); in TEST() 383 EXPECT_EQ(0, syscall(__NR_keyctl, KEYCTL_SESSION_TO_PARENT, 0, in TEST() 387 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST() 388 EXPECT_EQ(EACCES, errno); in TEST() [all …]
|
D | fs_test.c | 324 EXPECT_EQ(0, remove_path(TMP_DIR)); in cleanup_layout() 366 EXPECT_EQ(0, remove_path(file2_s1d3)); in remove_layout1() 367 EXPECT_EQ(0, remove_path(file2_s1d2)); in remove_layout1() 368 EXPECT_EQ(0, remove_path(file2_s1d1)); in remove_layout1() 369 EXPECT_EQ(0, remove_path(file1_s1d3)); in remove_layout1() 370 EXPECT_EQ(0, remove_path(file1_s1d2)); in remove_layout1() 371 EXPECT_EQ(0, remove_path(file1_s1d1)); in remove_layout1() 372 EXPECT_EQ(0, remove_path(dir_s1d3)); in remove_layout1() 374 EXPECT_EQ(0, remove_path(file2_s2d3)); in remove_layout1() 375 EXPECT_EQ(0, remove_path(file1_s2d3)); in remove_layout1() [all …]
|
/linux-6.12.1/tools/testing/selftests/perf_events/ |
D | sigtrap_threads.c | 162 EXPECT_EQ(ctx.signal_count, 0); in TEST_F() 168 EXPECT_EQ(ioctl(self->fd, PERF_EVENT_IOC_ENABLE, 0), 0); in TEST_F() 171 EXPECT_EQ(ctx.signal_count, NUM_THREADS); in TEST_F() 172 EXPECT_EQ(ctx.tids_want_signal, 0); in TEST_F() 173 EXPECT_EQ(ctx.first_siginfo.si_addr, &ctx.iterate_on); in TEST_F() 174 EXPECT_EQ(ctx.first_siginfo.si_perf_type, PERF_TYPE_BREAKPOINT); in TEST_F() 175 EXPECT_EQ(ctx.first_siginfo.si_perf_data, TEST_SIG_DATA(&ctx.iterate_on, 0)); in TEST_F() 179 EXPECT_EQ(ctx.signal_count, NUM_THREADS + 1); in TEST_F() 187 EXPECT_EQ(ioctl(self->fd, PERF_EVENT_IOC_MODIFY_ATTRIBUTES, &new_attr), 0); in TEST_F() 190 EXPECT_EQ(ctx.signal_count, NUM_THREADS); in TEST_F() [all …]
|
D | remove_on_exec.c | 113 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST_F() 114 EXPECT_EQ(WEXITSTATUS(status), 42); in TEST_F() 150 EXPECT_EQ(read(pipefd[0], &tmp, sizeof(int)), sizeof(int)); in TEST_F() 151 EXPECT_EQ(tmp, 42); in TEST_F() 154 EXPECT_EQ(ioctl(self->fd, PERF_EVENT_IOC_ENABLE, 0), 0); in TEST_F() 157 EXPECT_EQ(waitpid(pid_exec, &tmp, WNOHANG), 0); /* Should still be running. */ in TEST_F() 158 EXPECT_EQ(kill(pid_exec, SIGKILL), 0); in TEST_F() 164 EXPECT_EQ(waitpid(pid_only_fork, &tmp, 0), pid_only_fork); in TEST_F() 165 EXPECT_EQ(WEXITSTATUS(tmp), 42); in TEST_F() 177 EXPECT_EQ(ioctl(self->fd, PERF_EVENT_IOC_ENABLE, 0), 0); in TEST_F() [all …]
|
/linux-6.12.1/tools/testing/selftests/filesystems/eventfd/ |
D | eventfd_test.c | 54 EXPECT_EQ(flags, O_RDWR); in TEST() 68 EXPECT_EQ(flags, FD_CLOEXEC); in TEST() 82 EXPECT_EQ(flags & EFD_NONBLOCK, EFD_NONBLOCK); in TEST() 83 EXPECT_EQ(flags & O_RDWR, O_RDWR); in TEST() 97 EXPECT_EQ(flags & EFD_NONBLOCK, EFD_NONBLOCK); in TEST() 98 EXPECT_EQ(flags & O_RDWR, O_RDWR); in TEST() 102 EXPECT_EQ(flags, FD_CLOEXEC); in TEST() 176 EXPECT_EQ(ret & O_RDWR, O_RDWR); in TEST() 183 EXPECT_EQ(ret, 0); in TEST() 203 EXPECT_EQ(size, -1); in TEST() [all …]
|
/linux-6.12.1/tools/testing/selftests/seccomp/ |
D | seccomp_bpf.c | 333 EXPECT_EQ(ret, 0); in TEST() 370 EXPECT_EQ(0, ret) { in TEST() 385 EXPECT_EQ(-1, ret); in TEST() 386 EXPECT_EQ(EFAULT, errno) { in TEST() 413 EXPECT_EQ(-1, ret); in TEST() 414 EXPECT_EQ(EACCES, errno); in TEST() 416 EXPECT_EQ(0, ret); in TEST() 517 EXPECT_EQ(-1, ret); in TEST() 518 EXPECT_EQ(EINVAL, errno); in TEST() 537 EXPECT_EQ(0, ret); in TEST() [all …]
|
/linux-6.12.1/tools/testing/selftests/mm/ |
D | mdwe_test.c | 26 EXPECT_EQ(errno, EINVAL); in TEST() 29 EXPECT_EQ(errno, EINVAL); in TEST() 31 EXPECT_EQ(errno, EINVAL); in TEST() 33 EXPECT_EQ(errno, EINVAL); in TEST() 35 EXPECT_EQ(errno, EINVAL); in TEST() 38 EXPECT_EQ(errno, EINVAL); in TEST() 40 EXPECT_EQ(errno, EINVAL); in TEST() 42 EXPECT_EQ(errno, EINVAL); in TEST() 44 EXPECT_EQ(errno, EINVAL); in TEST() 111 EXPECT_EQ(prctl(PR_SET_MDWE, variant->first_flags, 0L, 0L, 0L), 0); in TEST_F() [all …]
|
/linux-6.12.1/tools/testing/selftests/net/netfilter/ |
D | conntrack_dump_flush.c | 321 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 331 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 334 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 337 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 340 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 360 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 379 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 398 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 418 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 435 EXPECT_EQ(ret, 2); in TEST_F() [all …]
|
/linux-6.12.1/tools/testing/selftests/pidfd/ |
D | pidfd_getfd_test.c | 172 EXPECT_EQ(0, close(self->pidfd)); in FIXTURE_TEARDOWN() 173 EXPECT_EQ(0, close(self->sk)); in FIXTURE_TEARDOWN() 177 EXPECT_EQ(0, ret); in FIXTURE_TEARDOWN() 199 EXPECT_EQ(-1, fd); in TEST_F() 200 EXPECT_EQ(EPERM, errno); in TEST_F() 216 EXPECT_EQ(ret, 0); in TEST_F() 230 EXPECT_EQ(-1, fd) { in TEST_F() 233 EXPECT_EQ(EBADF, errno) { in TEST_F() 241 EXPECT_EQ(errno, EINVAL); in TEST() 263 EXPECT_EQ(sys_pidfd_getfd(self->pidfd, self->remote_fd, 0), -1); in TEST_F() [all …]
|
/linux-6.12.1/tools/testing/selftests/syscall_user_dispatch/ |
D | sud_test.c | 97 EXPECT_EQ(EINVAL, errno); in TEST() 101 EXPECT_EQ(EINVAL, errno); in TEST() 105 EXPECT_EQ(EINVAL, errno); in TEST() 110 EXPECT_EQ(0, errno); in TEST() 117 EXPECT_EQ(EINVAL, errno); in TEST() 119 EXPECT_EQ(EINVAL, errno); in TEST() 209 EXPECT_EQ(-1, ret) { in TEST() 218 EXPECT_EQ(MAGIC_SYSCALL_1, ret) { in TEST() 221 EXPECT_EQ(1, nr_syscalls_emulated) { in TEST() 290 EXPECT_EQ(0, ret) { in TEST() [all …]
|
/linux-6.12.1/tools/testing/selftests/nolibc/ |
D | nolibc-test.c | 213 #define EXPECT_EQ(cond, expr, val) \ macro 720 CASE_TEST(argv_total); EXPECT_EQ(1, environ - test_argv - 1, test_argc ?: 1); break; in run_startup() 730 CASE_TEST(auxv_AT_UID); EXPECT_EQ(1, getauxval(AT_UID), getuid()); break; in run_startup() 731 CASE_TEST(constructor); EXPECT_EQ(1, constructor_test_value, 2); break; in run_startup() 733 CASE_TEST(linkage_constr); EXPECT_EQ(1, linkage_test_constructor_test_value, 6); break; in run_startup() 1127 CASE_TEST(setcmp_blah_blah); EXPECT_EQ(1, strcmp("blah", "blah"), 0); break; in run_stdlib() 1129 CASE_TEST(setncmp_blah_blah); EXPECT_EQ(1, strncmp("blah", "blah", 10), 0); break; in run_stdlib() 1130 CASE_TEST(setncmp_blah_blah4); EXPECT_EQ(1, strncmp("blah", "blah4", 4), 0); break; in run_stdlib() 1148 CASE_TEST(memcmp_20_20); EXPECT_EQ(1, memcmp("aaa\x20", "aaa\x20", 4), 0); break; in run_stdlib() 1155 CASE_TEST(limit_int8_max); EXPECT_EQ(1, INT8_MAX, (int8_t) 0x7f); break; in run_stdlib() [all …]
|
/linux-6.12.1/tools/testing/selftests/kvm/s390x/ |
D | ucontrol_test.c | 155 EXPECT_EQ(0, self->sie_block->ecb & ECB_SPECI); in TEST_F() 169 EXPECT_EQ(0, rc); in TEST_F() 170 EXPECT_EQ(~0UL, limit); in TEST_F() 174 EXPECT_EQ(-1, rc); in TEST_F() 175 EXPECT_EQ(EINVAL, errno); in TEST_F() 184 EXPECT_EQ(-1, rc); in TEST_F() 185 EXPECT_EQ(EINVAL, errno); in TEST_F() 206 EXPECT_EQ(0, rc); in TEST() 210 EXPECT_EQ(-1, rc); in TEST() 211 EXPECT_EQ(EINVAL, errno); in TEST() [all …]
|
/linux-6.12.1/tools/testing/selftests/mincore/ |
D | mincore_selftest.c | 41 EXPECT_EQ(0, retval); in TEST() 46 EXPECT_EQ(-1, retval); in TEST() 47 EXPECT_EQ(ENOMEM, errno); in TEST() 59 EXPECT_EQ(-1, retval); in TEST() 60 EXPECT_EQ(EINVAL, errno); in TEST() 65 EXPECT_EQ(-1, retval); in TEST() 66 EXPECT_EQ(ENOMEM, errno); in TEST() 71 EXPECT_EQ(-1, retval); in TEST() 72 EXPECT_EQ(EFAULT, errno); in TEST() 274 EXPECT_EQ(vec_size, i) { in TEST()
|
/linux-6.12.1/tools/testing/selftests/filesystems/epoll/ |
D | epoll_wakeup_test.c | 179 EXPECT_EQ(epoll_wait(efd, &e, 1, 0), 1); in TEST() 180 EXPECT_EQ(epoll_wait(efd, &e, 1, 0), 1); in TEST() 210 EXPECT_EQ(epoll_wait(efd, &e, 1, 0), 1); in TEST() 211 EXPECT_EQ(epoll_wait(efd, &e, 1, 0), 0); in TEST() 246 EXPECT_EQ(epoll_wait(efd, events, 2, 0), 2); in TEST() 247 EXPECT_EQ(epoll_wait(efd, events, 2, 0), 2); in TEST() 284 EXPECT_EQ(epoll_wait(efd, events, 2, 0), 2); in TEST() 285 EXPECT_EQ(epoll_wait(efd, events, 2, 0), 0); in TEST() 404 EXPECT_EQ(poll(&pfd, 1, 0), 1); in TEST() 405 EXPECT_EQ(epoll_wait(efd, events, 2, 0), 2); in TEST() [all …]
|
/linux-6.12.1/tools/testing/selftests/pid_namespace/ |
D | regression_enomem.c | 27 EXPECT_EQ(0, unshare(CLONE_NEWUSER)); in TEST() 29 EXPECT_EQ(0, unshare(CLONE_NEWPID)); in TEST() 37 EXPECT_EQ(0, wait_for_pid(pid)); in TEST()
|