Lines Matching refs:EXPECT_EQ
320 EXPECT_EQ(ret, 0); in TEST()
357 EXPECT_EQ(0, ret) { in TEST()
372 EXPECT_EQ(-1, ret); in TEST()
373 EXPECT_EQ(EFAULT, errno) { in TEST()
398 EXPECT_EQ(-1, ret); in TEST()
399 EXPECT_EQ(EACCES, errno); in TEST()
401 EXPECT_EQ(0, ret); in TEST()
502 EXPECT_EQ(-1, ret); in TEST()
503 EXPECT_EQ(EINVAL, errno); in TEST()
522 EXPECT_EQ(0, ret); in TEST()
528 EXPECT_EQ(2, ret); in TEST()
564 EXPECT_EQ(-1, ret); in TEST()
565 EXPECT_EQ(EINVAL, errno); in TEST()
587 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST()
606 EXPECT_EQ(0, syscall(__NR_getpid)) { in TEST_SIGNAL()
628 EXPECT_EQ(0, syscall(__NR_getpid)) { in TEST_SIGNAL()
673 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_SIGNAL()
675 EXPECT_EQ(0, syscall(__NR_getpid)); in TEST_SIGNAL()
708 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_SIGNAL()
711 EXPECT_EQ(0, syscall(__NR_times, &fatal_address)); in TEST_SIGNAL()
753 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_SIGNAL()
760 EXPECT_EQ(MAP_FAILED, map2); in TEST_SIGNAL()
927 EXPECT_EQ(-1, ret); in TEST()
928 EXPECT_EQ(EINVAL, errno); in TEST()
957 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST()
958 EXPECT_EQ(-1, read(0, NULL, 0)); in TEST()
959 EXPECT_EQ(E2BIG, errno); in TEST()
975 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST()
977 EXPECT_EQ(0, read(0, NULL, 0)); in TEST()
997 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST()
998 EXPECT_EQ(-1, read(0, NULL, 0)); in TEST()
999 EXPECT_EQ(4095, errno); in TEST()
1028 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST()
1029 EXPECT_EQ(-1, read(0, NULL, 0)); in TEST()
1030 EXPECT_EQ(12, errno); in TEST()
1127 EXPECT_EQ(SIGSYS, test); in TEST_F()
1138 EXPECT_EQ(__NR_getpid, sigsys->_syscall); in TEST_F()
1242 EXPECT_EQ(parent, res); in TEST_F()
1268 EXPECT_EQ(parent, res); in TEST_F_SIGNAL()
1271 EXPECT_EQ(0, res); in TEST_F_SIGNAL()
1296 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_F_SIGNAL()
1298 EXPECT_EQ(0, syscall(__NR_getpid)); in TEST_F_SIGNAL()
1321 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_F_SIGNAL()
1323 EXPECT_EQ(0, syscall(__NR_getpid)); in TEST_F_SIGNAL()
1346 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_F_SIGNAL()
1348 EXPECT_EQ(0, syscall(__NR_getpid)); in TEST_F_SIGNAL()
1369 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_F()
1370 EXPECT_EQ(0, syscall(__NR_getpid)); in TEST_F()
1391 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_F()
1392 EXPECT_EQ(0, syscall(__NR_getpid)); in TEST_F()
1411 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_F()
1413 EXPECT_EQ(-1, syscall(__NR_getpid)); in TEST_F()
1432 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_F()
1434 EXPECT_EQ(-1, syscall(__NR_getpid)); in TEST_F()
1452 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_F()
1454 EXPECT_EQ(mypid, syscall(__NR_getpid)); in TEST_F()
1472 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_F()
1474 EXPECT_EQ(mypid, syscall(__NR_getpid)); in TEST_F()
1620 EXPECT_EQ(0, ret); in tracer_poke()
1631 EXPECT_EQ(0, ret); in tracer_poke()
1683 EXPECT_EQ(0, self->poked); in TEST_F()
1685 EXPECT_EQ(-1, ret); in TEST_F()
1686 EXPECT_EQ(0x1001, self->poked); in TEST_F()
1699 EXPECT_EQ(0, self->poked); in TEST_F()
1701 EXPECT_EQ(0, self->poked); in TEST_F()
1719 EXPECT_EQ(0, ptrace(PTRACE_SET_SYSCALL, tracee, NULL, _nr))
1733 EXPECT_EQ(0, ptrace(PTRACE_SETREGSET, tracee, \
1856 # define EXPECT_SYSCALL_RETURN(val, action) EXPECT_EQ(-1, action)
1862 EXPECT_EQ(-1, action); \
1863 EXPECT_EQ(-(val), errno); \
1865 EXPECT_EQ(val, action); \
1909 EXPECT_EQ(0, ARCH_GETREGS(regs)) { in get_syscall()
1926 EXPECT_EQ(0, ARCH_GETREGS(regs)) { in __change_syscall()
1939 EXPECT_EQ(0, ARCH_SETREGS(regs)); in __change_syscall()
1966 EXPECT_EQ(0, ret); in tracer_seccomp()
1972 EXPECT_EQ(__NR_getpid, get_syscall(_metadata, tracee)); in tracer_seccomp()
1977 EXPECT_EQ(__NR_gettid, get_syscall(_metadata, tracee)); in tracer_seccomp()
1982 EXPECT_EQ(__NR_openat, get_syscall(_metadata, tracee)); in tracer_seccomp()
1987 EXPECT_EQ(__NR_getppid, get_syscall(_metadata, tracee)); in tracer_seccomp()
1990 EXPECT_EQ(0, msg) { in tracer_seccomp()
2022 EXPECT_EQ(0, ret); in tracer_ptrace()
2023 EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY in tracer_ptrace()
2150 EXPECT_EQ(-1, syscall(-1)); in TEST()
2151 EXPECT_EQ(errno, ENOSYS); in TEST()
2154 EXPECT_EQ(-1, syscall(-101)); in TEST()
2155 EXPECT_EQ(errno, ENOSYS); in TEST()
2166 EXPECT_EQ(self->parent, syscall(__NR_getppid)); in TEST_F()
2173 EXPECT_EQ(self->parent, syscall(__NR_getpid)); in TEST_F()
2210 EXPECT_EQ(-1, syscall(__NR_getpid)); in TEST_F()
2211 EXPECT_EQ(EPERM, errno); in TEST_F()
2258 EXPECT_EQ(EINVAL, errno) { in TEST()
2264 EXPECT_EQ(EINVAL, errno) { in TEST()
2268 EXPECT_EQ(EINVAL, errno) { in TEST()
2274 EXPECT_EQ(EINVAL, errno) { in TEST()
2278 EXPECT_EQ(EFAULT, errno) { in TEST()
2283 EXPECT_EQ(0, errno) { in TEST()
2309 EXPECT_EQ(0, ret) { in TEST()
2315 EXPECT_EQ(EINVAL, errno) { in TEST()
2320 EXPECT_EQ(EINVAL, errno) { in TEST()
2364 EXPECT_EQ(-1, ret); in TEST()
2365 EXPECT_EQ(EFAULT, errno) { in TEST()
2386 EXPECT_EQ(-1, ret); in TEST()
2387 EXPECT_EQ(EFAULT, errno) { in TEST()
2397 EXPECT_EQ(-1, ret); in TEST()
2398 EXPECT_EQ(EINVAL, errno) { in TEST()
2409 EXPECT_EQ(-1, ret); in TEST()
2410 EXPECT_EQ(EINVAL, errno) { in TEST()
2437 EXPECT_EQ(0, ret) { in TEST()
2638 EXPECT_EQ(SIBLING_EXIT_FAILURE, (long)status); in TEST_F()
2640 EXPECT_EQ(SIBLING_EXIT_UNKILLED, (long)status); in TEST_F()
2680 EXPECT_EQ(0x0, (long)status); in TEST_F()
2682 EXPECT_EQ(0x0, (long)status); in TEST_F()
2706 EXPECT_EQ(SIBLING_EXIT_NEWPRIVS, (long)status); in TEST_F()
2708 EXPECT_EQ(SIBLING_EXIT_NEWPRIVS, (long)status); in TEST_F()
2746 EXPECT_EQ(0x0, (long)status); in TEST_F()
2748 EXPECT_EQ(0x0, (long)status); in TEST_F()
2791 EXPECT_EQ(SIBLING_EXIT_UNKILLED, (long)status); in TEST_F()
2793 EXPECT_EQ(SIBLING_EXIT_UNKILLED, (long)status); in TEST_F()
2840 EXPECT_EQ(SIBLING_EXIT_UNKILLED, (long)status); in TEST_F()
2842 EXPECT_EQ(SIBLING_EXIT_UNKILLED, (long)status); in TEST_F()
2900 EXPECT_EQ(SIBLING_EXIT_UNKILLED, (long)status); in TEST_F()
2925 EXPECT_EQ(0, (long)status); in TEST_F()
2985 EXPECT_EQ(0, ptrace(PTRACE_TRACEME)); in TEST()
2986 EXPECT_EQ(0, raise(SIGSTOP)); in TEST()
2988 EXPECT_EQ(0, close(pipefd[1])); in TEST()
2990 EXPECT_EQ(0, prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) { in TEST()
2995 EXPECT_EQ(0, ret) { in TEST()
2999 EXPECT_EQ(1, read(pipefd[0], &buf, 1)) { in TEST()
3002 EXPECT_EQ('.', buf) { in TEST()
3009 EXPECT_EQ(0, nanosleep(&timeout, NULL)) { in TEST()
3014 EXPECT_EQ(1, read(pipefd[0], &buf, 1)) { in TEST()
3017 EXPECT_EQ('!', buf) { in TEST()
3025 EXPECT_EQ(0, close(pipefd[0])); in TEST()
3049 EXPECT_EQ(0, info.si_errno); in TEST()
3050 EXPECT_EQ(getuid(), info.si_uid); in TEST()
3052 EXPECT_EQ(child_pid, info.si_pid); in TEST()
3067 EXPECT_EQ(SIGSTOP, info.si_signo); in TEST()
3094 EXPECT_EQ(__NR_nanosleep, ret); in TEST()
3098 EXPECT_EQ(__NR_restart_syscall, ret); in TEST()
3104 EXPECT_EQ(0, close(pipefd[1])); in TEST()
3146 EXPECT_EQ(EINVAL, errno) { in TEST_SIGNAL()
3152 EXPECT_EQ(0, ret); in TEST_SIGNAL()
3160 EXPECT_EQ(0, ret); in TEST_SIGNAL()
3165 EXPECT_EQ(0, ret); in TEST_SIGNAL()
3167 EXPECT_EQ(parent, syscall(__NR_getppid)); in TEST_SIGNAL()
3169 EXPECT_EQ(0, syscall(__NR_getpid)); in TEST_SIGNAL()
3188 EXPECT_EQ(ret, 0); in TEST()
3192 EXPECT_EQ(ret, 0) { in TEST()
3200 EXPECT_EQ(ret, -1); in TEST()
3201 EXPECT_EQ(errno, EOPNOTSUPP); in TEST()
3232 EXPECT_EQ(0, seccomp(SECCOMP_SET_MODE_FILTER, in TEST()
3234 EXPECT_EQ(0, seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog)); in TEST()
3236 EXPECT_EQ(0, close(pipefd[0])); in TEST()
3255 EXPECT_EQ(sizeof(md), ret) { in TEST()
3260 EXPECT_EQ(md.flags, SECCOMP_FILTER_FLAG_LOG); in TEST()
3261 EXPECT_EQ(md.filter_off, 0); in TEST()
3265 EXPECT_EQ(sizeof(md), ret); in TEST()
3266 EXPECT_EQ(md.flags, 0); in TEST()
3267 EXPECT_EQ(md.filter_off, 1); in TEST()
3325 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
3326 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3327 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
3330 EXPECT_EQ(seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog), 0); in TEST()
3331 EXPECT_EQ(seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog), 0); in TEST()
3332 EXPECT_EQ(seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog), 0); in TEST()
3333 EXPECT_EQ(seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog), 0); in TEST()
3341 EXPECT_EQ(user_notif_syscall(__NR_getppid, in TEST()
3344 EXPECT_EQ(errno, EBUSY); in TEST()
3358 EXPECT_EQ(pollfd.revents, POLLIN); in TEST()
3365 EXPECT_EQ(-1, ret); in TEST()
3366 EXPECT_EQ(EINVAL, errno); in TEST()
3370 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_RECV, &req), 0); in TEST()
3377 EXPECT_EQ(pollfd.revents, POLLOUT); in TEST()
3379 EXPECT_EQ(req.data.nr, __NR_getppid); in TEST()
3387 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), -1); in TEST()
3388 EXPECT_EQ(errno, EINVAL); in TEST()
3391 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0); in TEST()
3393 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
3394 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3395 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
3450 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_RECV, &req), 0); in TEST()
3451 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_ID_VALID, &req.id), 0); in TEST()
3453 EXPECT_EQ(kill(pid, SIGKILL), 0); in TEST()
3454 EXPECT_EQ(waitpid(pid, NULL, 0), pid); in TEST()
3456 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_ID_VALID, &req.id), -1); in TEST()
3460 EXPECT_EQ(ret, -1); in TEST()
3461 EXPECT_EQ(errno, ENOENT); in TEST()
3515 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_RECV, &req), 0); in TEST()
3517 EXPECT_EQ(kill(pid, SIGUSR1), 0); in TEST()
3524 EXPECT_EQ(read(sk_pair[0], &c, 1), 1); in TEST()
3530 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), -1); in TEST()
3531 EXPECT_EQ(errno, ENOENT); in TEST()
3534 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_RECV, &req), 0); in TEST()
3540 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0); in TEST()
3542 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
3543 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3544 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
3575 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
3576 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3577 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
3605 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_RECV, &req), 0); in TEST()
3606 EXPECT_EQ(req.pid, pid); in TEST()
3612 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0); in TEST()
3614 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
3615 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3616 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
3651 EXPECT_EQ(waitpid(pid2, &status, 0), pid2); in TEST()
3652 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3653 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
3673 EXPECT_EQ(req.pid, 0); in TEST()
3685 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
3686 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3687 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
3689 EXPECT_EQ(waitpid(pid2, &status, 0), pid2); in TEST()
3690 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3691 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
3714 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_RECV, NULL), -1); in TEST()
3715 EXPECT_EQ(errno, EFAULT); in TEST()
3718 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_RECV, &req), 0); in TEST()
3719 EXPECT_EQ(req.pid, pid); in TEST()
3725 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0); in TEST()
3727 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
3728 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3729 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
3737 EXPECT_EQ(sizes.seccomp_notif, sizeof(struct seccomp_notif)); in TEST()
3738 EXPECT_EQ(sizes.seccomp_notif_resp, sizeof(struct seccomp_notif_resp)); in TEST()
3780 EXPECT_EQ(pollfd.revents, POLLIN); in TEST()
3782 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_RECV, &req), 0); in TEST()
3788 EXPECT_EQ(pollfd.revents, POLLOUT); in TEST()
3790 EXPECT_EQ(req.data.nr, __NR_dup); in TEST()
3801 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), -1); in TEST()
3802 EXPECT_EQ(errno, EINVAL); in TEST()
3806 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), -1); in TEST()
3807 EXPECT_EQ(errno, EINVAL); in TEST()
3811 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0) { in TEST()
3817 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
3818 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3819 EXPECT_EQ(0, WEXITSTATUS(status)) { in TEST()
3861 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
3862 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3863 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
3947 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
3948 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
3949 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
4015 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_ADDFD, &addfd), -1); in TEST()
4016 EXPECT_EQ(errno, EINVAL); in TEST()
4021 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_ADDFD, &addfd), -1); in TEST()
4022 EXPECT_EQ(errno, EINVAL); in TEST()
4027 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_ADDFD, &addfd), -1); in TEST()
4028 EXPECT_EQ(errno, EINVAL); in TEST()
4032 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_ADDFD_SMALL, &small), -1); in TEST()
4033 EXPECT_EQ(errno, EINVAL); in TEST()
4038 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_ADDFD_BIG, &big), -1); in TEST()
4039 EXPECT_EQ(errno, E2BIG); in TEST()
4044 EXPECT_EQ(fd, nextfd++); in TEST()
4045 EXPECT_EQ(filecmp(getpid(), pid, memfd, fd), 0); in TEST()
4051 EXPECT_EQ(fd, nextfd++); in TEST()
4057 EXPECT_EQ(fd, 42); in TEST()
4058 EXPECT_EQ(filecmp(getpid(), pid, memfd, fd), 0); in TEST()
4064 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0); in TEST()
4089 EXPECT_EQ(fd, nextfd++); in TEST()
4090 EXPECT_EQ(filecmp(getpid(), pid, memfd, fd), 0); in TEST()
4110 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0); in TEST()
4113 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
4114 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
4115 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()
4164 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_ADDFD, &addfd), -1); in TEST()
4165 EXPECT_EQ(errno, EMFILE); in TEST()
4168 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_ADDFD, &addfd), -1); in TEST()
4169 EXPECT_EQ(errno, EMFILE); in TEST()
4173 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_ADDFD, &addfd), -1); in TEST()
4174 EXPECT_EQ(errno, EBADF); in TEST()
4180 EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0); in TEST()
4183 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
4184 EXPECT_EQ(true, WIFEXITED(status)); in TEST()
4185 EXPECT_EQ(0, WEXITSTATUS(status)); in TEST()