/linux/tools/testing/selftests/net/ |
A D | tls.c | 691 EXPECT_EQ(errno, EIO); in TEST_F() 709 EXPECT_EQ(errno, EIO); in TEST_F() 908 EXPECT_EQ(err, true); in TEST_F() 1415 EXPECT_EQ(ret, 0); in TEST_F() 1417 EXPECT_EQ(ret, -1); in TEST_F() 1421 EXPECT_EQ(ret, -1); in TEST_F() 1604 EXPECT_EQ(ret, -1); in TEST() 1611 EXPECT_EQ(ret, -1); in TEST() 1624 EXPECT_EQ(ret, -1); in TEST() 1645 EXPECT_EQ(ret, 0); in TEST() [all …]
|
A D | reuseaddr_ports_exhausted.c | 93 EXPECT_EQ(-1, fd[1]) TH_LOG("should fail to bind."); in TEST() 115 EXPECT_EQ(-1, fd[1]) TH_LOG("should fail to bind because both sockets succeed to be listened."); in TEST() 153 …EXPECT_EQ(-1, ret) TH_LOG("should fail to listen because only one uid reserves the port in TCP_LIS… in TEST()
|
/linux/tools/testing/selftests/core/ |
A D | close_range_test.c | 202 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST() 245 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST() 464 EXPECT_EQ(close(fd1), 0); in TEST() 465 EXPECT_EQ(close(fd2), 0); in TEST() 466 EXPECT_EQ(close(fd3), 0); in TEST() 533 EXPECT_EQ(close(fd1), 0); in TEST() 534 EXPECT_EQ(close(fd2), 0); in TEST() 535 EXPECT_EQ(close(fd3), 0); in TEST() 565 EXPECT_EQ(close(fd1), 0); in TEST() 566 EXPECT_EQ(close(fd2), 0); in TEST() [all …]
|
/linux/tools/testing/selftests/seccomp/ |
A D | seccomp_bpf.c | 320 EXPECT_EQ(ret, 0); in TEST() 357 EXPECT_EQ(0, ret) { in TEST() 372 EXPECT_EQ(-1, ret); in TEST() 398 EXPECT_EQ(-1, ret); in TEST() 401 EXPECT_EQ(0, ret); in TEST() 502 EXPECT_EQ(-1, ret); in TEST() 522 EXPECT_EQ(0, ret); in TEST() 528 EXPECT_EQ(2, ret); in TEST() 564 EXPECT_EQ(-1, ret); in TEST() 1271 EXPECT_EQ(0, res); in TEST_F_SIGNAL() [all …]
|
/linux/tools/testing/selftests/perf_events/ |
A D | sigtrap_threads.c | 155 EXPECT_EQ(ctx.signal_count, 0); in TEST_F() 164 EXPECT_EQ(ctx.signal_count, NUM_THREADS); in TEST_F() 165 EXPECT_EQ(ctx.tids_want_signal, 0); in TEST_F() 166 EXPECT_EQ(ctx.first_siginfo.si_addr, &ctx.iterate_on); in TEST_F() 172 EXPECT_EQ(ctx.signal_count, NUM_THREADS + 1); in TEST_F() 183 EXPECT_EQ(ctx.signal_count, NUM_THREADS); in TEST_F() 184 EXPECT_EQ(ctx.tids_want_signal, 0); in TEST_F() 185 EXPECT_EQ(ctx.first_siginfo.si_addr, &ctx.iterate_on); in TEST_F() 191 EXPECT_EQ(ctx.signal_count, NUM_THREADS + 1); in TEST_F() 204 EXPECT_EQ(ctx.tids_want_signal, 0); in TEST_F() [all …]
|
A 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() 151 EXPECT_EQ(tmp, 42); in TEST_F() 154 EXPECT_EQ(ioctl(self->fd, PERF_EVENT_IOC_ENABLE, 0), 0); 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() 191 EXPECT_EQ(kill(pid_exec, SIGKILL), 0); in TEST_F() 219 EXPECT_EQ(waitpid(pids[i], &tmp, WNOHANG), 0); in TEST_F() [all …]
|
/linux/tools/testing/selftests/landlock/ |
A D | ptrace_test.c | 36 EXPECT_EQ(0, close(ruleset_fd)); in create_domain() 249 EXPECT_EQ(-1, ret); in TEST_F() 250 EXPECT_EQ(EPERM, errno); in TEST_F() 253 EXPECT_EQ(0, ret); in TEST_F() 265 EXPECT_EQ(-1, ret); in TEST_F() 266 EXPECT_EQ(EPERM, errno); in TEST_F() 268 EXPECT_EQ(0, ret); in TEST_F() 309 EXPECT_EQ(ESRCH, errno); in TEST_F() 316 EXPECT_EQ(-1, ret); in TEST_F() 317 EXPECT_EQ(EPERM, errno); in TEST_F() [all …]
|
A D | fs_test.c | 176 EXPECT_EQ(0, umount(TMP_DIR)); in cleanup_layout() 178 EXPECT_EQ(0, remove_path(TMP_DIR)); in cleanup_layout() 205 EXPECT_EQ(0, remove_path(file2_s1d3)); in remove_layout1() 206 EXPECT_EQ(0, remove_path(file2_s1d2)); in remove_layout1() 207 EXPECT_EQ(0, remove_path(file2_s1d1)); in remove_layout1() 217 EXPECT_EQ(0, remove_path(dir_s3d3)); in remove_layout1() 221 EXPECT_EQ(0, remove_path(dir_s3d2)); in remove_layout1() 2090 EXPECT_EQ(0, umount(dir_s2d2)); in FIXTURE_TEARDOWN() 2462 EXPECT_EQ(0, umount(LOWER_BASE)); in FIXTURE_TEARDOWN() 2473 EXPECT_EQ(0, umount(UPPER_BASE)); in FIXTURE_TEARDOWN() [all …]
|
/linux/tools/testing/selftests/sgx/ |
A D | main.c | 210 EXPECT_EQ((run)->function, EEXIT); \ 226 EXPECT_EQ(self->run.user_data, 0); in TEST_F() 233 EXPECT_EQ(op.buffer, MAGIC); in TEST_F() 235 EXPECT_EQ(self->run.user_data, 0); in TEST_F() 245 EXPECT_EQ(ENCL_CALL(&op, &self->run, true), 0); in TEST_F() 248 EXPECT_EQ(self->run.user_data, 0); in TEST_F() 255 EXPECT_EQ(op.buffer, MAGIC); in TEST_F() 257 EXPECT_EQ(self->run.user_data, 0); in TEST_F() 281 EXPECT_EQ(self->run.user_data, 0); in TEST_F() 288 EXPECT_EQ(op.buffer, MAGIC); in TEST_F() [all …]
|
/linux/tools/testing/selftests/syscall_user_dispatch/ |
A 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() 195 EXPECT_EQ(-1, ret) { in TEST() 204 EXPECT_EQ(MAGIC_SYSCALL_1, ret) { in TEST() 207 EXPECT_EQ(1, nr_syscalls_emulated) { in TEST() 276 EXPECT_EQ(0, ret) { in TEST() [all …]
|
/linux/tools/testing/selftests/pidfd/ |
A D | pidfd_getfd_test.c | 168 EXPECT_EQ(0, close(self->pidfd)); in FIXTURE_TEARDOWN() 169 EXPECT_EQ(0, close(self->sk)); in FIXTURE_TEARDOWN() 171 EXPECT_EQ(0, wait_for_pid(self->pid)); in FIXTURE_TEARDOWN() 193 EXPECT_EQ(-1, fd); in TEST_F() 194 EXPECT_EQ(EPERM, errno); in TEST_F() 210 EXPECT_EQ(ret, 0); in TEST_F() 224 EXPECT_EQ(-1, fd) { in TEST_F() 227 EXPECT_EQ(EBADF, errno) { in TEST_F() 235 EXPECT_EQ(errno, EINVAL); in TEST()
|
A D | pidfd_setns_test.c | 146 EXPECT_EQ(errno, ENOENT) { in FIXTURE_SETUP() 174 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 204 EXPECT_EQ(ret, 0); in FIXTURE_SETUP() 239 EXPECT_EQ(errno, ENOENT) { in FIXTURE_SETUP() 252 EXPECT_EQ(errno, ENOENT) { in FIXTURE_SETUP() 346 EXPECT_EQ(errno, EINVAL); in TEST_F() 349 EXPECT_EQ(errno, EINVAL); in TEST_F() 352 EXPECT_EQ(errno, EINVAL); in TEST_F() 355 EXPECT_EQ(errno, EINVAL); in TEST_F() 366 EXPECT_EQ(errno, ESRCH); in TEST_F() [all …]
|
A D | pidfd_wait.c | 61 EXPECT_EQ(close(pidfd), 0); in TEST() 69 EXPECT_EQ(close(pidfd), 0); in TEST() 82 EXPECT_EQ(close(pidfd), 0); in TEST() 138 EXPECT_EQ(close(pidfd), 0); in TEST() 171 EXPECT_EQ(close(pidfd), 0); in TEST() 222 EXPECT_EQ(close(pidfd), 0); in TEST()
|
/linux/tools/testing/selftests/mincore/ |
A 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() 268 EXPECT_EQ(vec_size, i) { in TEST()
|
/linux/tools/testing/selftests/filesystems/epoll/ |
A D | epoll_wakeup_test.c | 496 EXPECT_EQ(ctx.count, 2); in TEST() 539 EXPECT_EQ(ctx.count, 1); in TEST() 586 EXPECT_EQ(ctx.count, 2); in TEST() 635 EXPECT_EQ(ctx.count, 2); in TEST() 680 EXPECT_EQ(ctx.count, 2); in TEST() 723 EXPECT_EQ(ctx.count, 1); in TEST() 770 EXPECT_EQ(ctx.count, 2); in TEST() 819 EXPECT_EQ(ctx.count, 2); in TEST() 1224 EXPECT_EQ(ctx.count, 2); in TEST() 1276 EXPECT_EQ(ctx.count, 2); in TEST() [all …]
|
/linux/tools/testing/selftests/pid_namespace/ |
A 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()
|
/linux/tools/testing/selftests/nci/ |
A D | nci_dev.c | 433 EXPECT_EQ(get_dev_enable_state(&msg), 0); in FIXTURE_SETUP() 445 EXPECT_EQ(rc, 0); in FIXTURE_SETUP() 515 EXPECT_EQ(rc, 0); in FIXTURE_TEARDOWN() 534 EXPECT_EQ(get_dev_enable_state(&msg), 1); in TEST_F() 631 EXPECT_EQ(status, 0); in TEST_F() 635 EXPECT_EQ(status, 0); in TEST_F() 846 EXPECT_EQ(status, 0); in TEST_F() 856 EXPECT_EQ(status, 0); in TEST_F() 869 EXPECT_EQ(get_dev_enable_state(&msg), 1); in TEST_F() 881 EXPECT_EQ(rc, 0); in TEST_F() [all …]
|
/linux/tools/testing/selftests/filesystems/binderfs/ |
A D | binderfs_test.c | 78 EXPECT_EQ(ret, 0) { in __do_binderfs_test() 135 EXPECT_EQ(ret, 0) { in __do_binderfs_test() 149 EXPECT_EQ(errno, EPERM) { in __do_binderfs_test() 174 EXPECT_EQ(ret, 0) { in __do_binderfs_test() 179 EXPECT_EQ(ret, 0) { in __do_binderfs_test()
|
/linux/tools/testing/selftests/clone3/ |
A D | clone3_cap_checkpoint_restore.c | 147 EXPECT_EQ(getuid(), 0) in TEST() 169 EXPECT_EQ(setgid(65534), 0) in TEST()
|
/linux/tools/testing/selftests/exec/ |
A D | non-regular.c | 166 EXPECT_EQ(errno, variant->expected); in TEST_F() 193 EXPECT_EQ(errno, EACCES); in TEST_F()
|
/linux/tools/testing/selftests/mount_setattr/ |
A D | mount_setattr_test.c | 668 EXPECT_EQ(close(fd), 0); in TEST_F() 719 EXPECT_EQ(fsync(dfd), 0); in TEST_F() 720 EXPECT_EQ(close(dfd), 0); in TEST_F() 722 EXPECT_EQ(fsync(fd), 0); in TEST_F() 723 EXPECT_EQ(close(fd), 0); in TEST_F() 934 EXPECT_EQ(pthread_join(threads[j], &retptr), 0); in TEST_F() 937 EXPECT_EQ(ret, 0); in TEST_F() 977 EXPECT_EQ(create_and_enter_userns(), 0); in TEST_F()
|
/linux/tools/testing/selftests/rtc/ |
A D | rtctest.c | 71 EXPECT_EQ(NUM_UIE, irq); 106 EXPECT_EQ(NUM_UIE, irq); in TEST_F()
|
/linux/tools/testing/selftests/uevent/ |
A D | uevent_filtering.c | 359 EXPECT_EQ(0, ret) { in TEST()
|
/linux/tools/testing/selftests/ |
A D | kselftest_harness.h | 564 #define EXPECT_EQ(expected, seen) \ macro
|
/linux/Documentation/dev-tools/ |
A D | kselftest.rst | 348 ASSERT_STREQ ASSERT_STRNE EXPECT_EQ EXPECT_NE EXPECT_LT
|