Lines Matching refs:EXPECT_EQ
189 EXPECT_EQ(cmsg->cmsg_level, SOL_TLS); in tls_recv_cmsg()
190 EXPECT_EQ(cmsg->cmsg_type, TLS_GET_RECORD_TYPE); in tls_recv_cmsg()
192 EXPECT_EQ(ctype, record_type); in tls_recv_cmsg()
223 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
225 EXPECT_EQ(memcmp(buf, test_str, send_len), 0); in TEST_F()
349 EXPECT_EQ(send(self->fd, test_str, to_send, 0), to_send); in TEST_F()
350 EXPECT_EQ(recv(self->cfd, recv_buf, to_send, MSG_WAITALL), to_send); in TEST_F()
351 EXPECT_EQ(memcmp(test_str, recv_buf, to_send), 0); in TEST_F()
354 EXPECT_EQ(recv(self->cfd, buf, st.st_size, MSG_WAITALL), st.st_size); in TEST_F()
377 EXPECT_EQ(size, test_payload_size); in chunked_sendfile()
386 EXPECT_EQ(recv(self->cfd, buf, test_payload_size, MSG_WAITALL), in chunked_sendfile()
425 EXPECT_EQ(memcmp(buf, recv_mem, send_len), 0); in TEST_F()
435 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
437 EXPECT_EQ(memcmp(buf, test_str, send_len), 0); in TEST_F()
446 EXPECT_EQ(send(self->fd, test_str, send_len, MSG_MORE), send_len); in TEST_F()
447 EXPECT_EQ(recv(self->cfd, buf, send_len, MSG_DONTWAIT), -1); in TEST_F()
448 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
449 EXPECT_EQ(recv(self->cfd, buf, send_len * 2, MSG_WAITALL), in TEST_F()
451 EXPECT_EQ(memcmp(buf, test_str, send_len), 0); in TEST_F()
460 EXPECT_EQ(send(self->fd, test_str, send_len, MSG_MORE), send_len); in TEST_F()
461 EXPECT_EQ(recv(self->cfd, buf, send_len, MSG_DONTWAIT), -1); in TEST_F()
478 EXPECT_EQ(sendmsg(self->fd, &msg, 0), send_len); in TEST_F()
479 EXPECT_EQ(recv(self->cfd, buf, send_len, MSG_WAITALL), send_len); in TEST_F()
480 EXPECT_EQ(memcmp(buf, test_str, send_len), 0); in TEST_F()
503 EXPECT_EQ(sendmsg(self->fd, &msg, 0), SEND_LEN * frags); in TEST_F()
504 EXPECT_EQ(recv(self->cfd, buf, SEND_LEN * frags, MSG_WAITALL), in TEST_F()
508 EXPECT_EQ(memcmp(buf + SEND_LEN * i, in TEST_F()
530 EXPECT_EQ(sendmsg(self->cfd, &msg, 0), send_len); in TEST_F()
563 EXPECT_EQ(sendmsg(self->cfd, &msg, 0), total_len); in TEST_F()
567 EXPECT_EQ(memcmp(test_strs[i], buf + len_cmp, in TEST_F()
600 EXPECT_EQ(sendmsg(self->fd, &msg, 0), total_len); in TEST_F()
620 EXPECT_EQ(recv(self->cfd, mem_recv, send_len, MSG_WAITALL), send_len); in TEST_F()
621 EXPECT_EQ(memcmp(mem_send, mem_recv, send_len), 0); in TEST_F()
638 EXPECT_EQ(recv(self->cfd, mem_recv, send_len, MSG_WAITALL), send_len); in TEST_F()
639 EXPECT_EQ(memcmp(mem_send, mem_recv, send_len), 0); in TEST_F()
653 EXPECT_EQ(send(self->fd, test_str, send_len2, 0), send_len2); in TEST_F()
654 EXPECT_EQ(recv(self->cfd, buf, send_len2, MSG_WAITALL), send_len2); in TEST_F()
655 EXPECT_EQ(memcmp(test_str, buf, send_len2), 0); in TEST_F()
660 EXPECT_EQ(recv(self->cfd, mem_recv, send_len, MSG_WAITALL), send_len); in TEST_F()
661 EXPECT_EQ(memcmp(mem_send, mem_recv, send_len), 0); in TEST_F()
675 EXPECT_EQ(memcmp(mem_send, mem_recv, send_len), 0); in TEST_F()
687 EXPECT_EQ(tls_send_cmsg(self->fd, 100, test_str, send_len, 0), 10); in TEST_F()
688 EXPECT_EQ(splice(self->cfd, NULL, p[1], NULL, send_len, 0), -1); in TEST_F()
689 EXPECT_EQ(errno, EINVAL); in TEST_F()
690 EXPECT_EQ(recv(self->cfd, buf, send_len, 0), -1); in TEST_F()
691 EXPECT_EQ(errno, EIO); in TEST_F()
692 EXPECT_EQ(tls_recv_cmsg(_metadata, self->cfd, record_type, in TEST_F()
695 EXPECT_EQ(memcmp(test_str, buf, send_len), 0); in TEST_F()
707 EXPECT_EQ(tls_send_cmsg(self->fd, 100, test_str, send_len, 0), 10); in TEST_F()
708 EXPECT_EQ(recv(self->cfd, buf, send_len, 0), -1); in TEST_F()
709 EXPECT_EQ(errno, EIO); in TEST_F()
710 EXPECT_EQ(splice(self->cfd, NULL, p[1], NULL, send_len, 0), -1); in TEST_F()
711 EXPECT_EQ(errno, EINVAL); in TEST_F()
712 EXPECT_EQ(tls_recv_cmsg(_metadata, self->cfd, record_type, in TEST_F()
715 EXPECT_EQ(memcmp(test_str, buf, send_len), 0); in TEST_F()
727 EXPECT_EQ(send(self->fd, mem_send, send_len, 0), send_len); in TEST_F()
729 EXPECT_EQ(recv(self->cfd, mem_recv, half, MSG_WAITALL), half); in TEST_F()
730 EXPECT_EQ(splice(self->cfd, NULL, p[1], NULL, half, SPLICE_F_NONBLOCK), in TEST_F()
732 EXPECT_EQ(read(p[0], &mem_recv[half], half), half); in TEST_F()
733 EXPECT_EQ(memcmp(mem_send, mem_recv, send_len), 0); in TEST_F()
748 EXPECT_EQ(send(self->fd, &mem_send[chunk * i], chunk, 0), in TEST_F()
751 EXPECT_EQ(recv(self->cfd, mem_recv, chunk * 5 / 2, in TEST_F()
754 EXPECT_EQ(memcmp(mem_send, mem_recv, chunk * 5 / 2), 0); in TEST_F()
762 EXPECT_EQ(n, send_len); in TEST_F()
763 EXPECT_EQ(read(p[0], mem_recv, send_len), send_len); in TEST_F()
764 EXPECT_EQ(memcmp(mem_send, mem_recv, send_len), 0); in TEST_F()
776 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
782 EXPECT_EQ(memcmp(test_str, buf, send_len), 0); in TEST_F()
795 EXPECT_EQ(send(self->fd, send_mem, send_len, 0), send_len); in TEST_F()
802 EXPECT_EQ(memcmp(send_mem, recv_mem, send_len), 0); in TEST_F()
818 EXPECT_EQ(send(self->fd, buf, send_len, 0), send_len); in TEST_F()
847 EXPECT_EQ(memcmp(send_mem, recv_mem, total_len), 0); in TEST_F()
860 EXPECT_EQ(recv(self->cfd, recv_mem, total_len, MSG_WAITALL), total_len); in TEST_F()
862 EXPECT_EQ(memcmp(send_mem, recv_mem, send_len), 0); in TEST_F()
863 EXPECT_EQ(memcmp(send_mem, recv_mem + send_len, send_len), 0); in TEST_F()
876 EXPECT_EQ(recv(self->cfd, recv_mem, recv_len, 0), recv_len); in TEST_F()
877 EXPECT_EQ(recv(self->cfd, recv_mem + recv_len, recv_len, 0), 5); in TEST_F()
878 EXPECT_EQ(memcmp(send_mem, recv_mem, total_len), 0); in TEST_F()
890 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
893 EXPECT_EQ(memcmp(test_str_first, recv_mem, strlen(test_str_first)), 0); in TEST_F()
897 EXPECT_EQ(memcmp(test_str_second, recv_mem, strlen(test_str_second)), in TEST_F()
906 EXPECT_EQ(recv(self->cfd, buf, sizeof(buf), MSG_DONTWAIT), -1); in TEST_F()
908 EXPECT_EQ(err, true); in TEST_F()
917 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
919 EXPECT_EQ(memcmp(test_str, buf, send_len), 0); in TEST_F()
922 EXPECT_EQ(memcmp(test_str, buf, send_len), 0); in TEST_F()
933 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
936 EXPECT_EQ(memcmp(test_str, buf, send_len), 0); in TEST_F()
940 EXPECT_EQ(memcmp(test_str, buf, send_len), 0); in TEST_F()
952 EXPECT_EQ(send(self->fd, test_str_first, len, 0), len); in TEST_F()
955 EXPECT_EQ(send(self->fd, test_str_second, len, 0), len); in TEST_F()
959 EXPECT_EQ(recv(self->cfd, buf, len, MSG_PEEK | MSG_WAITALL), len); in TEST_F()
963 EXPECT_EQ(memcmp(test_str_first, buf, len), 0); in TEST_F()
967 EXPECT_EQ(recv(self->cfd, buf, len, MSG_WAITALL), len); in TEST_F()
973 EXPECT_EQ(memcmp(test_str, buf, len), 0); in TEST_F()
979 EXPECT_EQ(send(self->fd, test_str_first, len, MSG_MORE), len); in TEST_F()
982 EXPECT_EQ(send(self->fd, test_str_second, len, 0), len); in TEST_F()
986 EXPECT_EQ(recv(self->cfd, buf, len, MSG_PEEK | MSG_WAITALL), len); in TEST_F()
989 EXPECT_EQ(memcmp(test_str, buf, len), 0); in TEST_F()
1001 EXPECT_EQ(send(self->fd, test_str_first, len, 0), len); in TEST_F()
1004 EXPECT_EQ(send(self->fd, test_str_second, len, 0), len); in TEST_F()
1011 EXPECT_EQ(memcmp(test_str, buf, len), 0); in TEST_F()
1020 EXPECT_EQ(send(self->fd, send_mem, 10, 0), 10); in TEST_F()
1021 EXPECT_EQ(send(self->fd, send_mem, 5, 0), 5); in TEST_F()
1024 EXPECT_EQ(setsockopt(self->cfd, SOL_SOCKET, SO_RCVLOWAT, in TEST_F()
1026 EXPECT_EQ(recv(self->cfd, recv_mem, 1, MSG_WAITALL), 1); in TEST_F()
1027 EXPECT_EQ(recv(self->cfd, recv_mem + 1, 6, MSG_WAITALL), 6); in TEST_F()
1028 EXPECT_EQ(recv(self->cfd, recv_mem + 7, 10, 0), 8); in TEST_F()
1030 EXPECT_EQ(memcmp(send_mem, recv_mem, 10), 0); in TEST_F()
1031 EXPECT_EQ(memcmp(send_mem, recv_mem + 10, 5), 0); in TEST_F()
1058 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
1060 EXPECT_EQ(memcmp(buf, test_str, send_len), 0); in TEST_F()
1064 EXPECT_EQ(send(self->cfd, test_str, send_len, 0), send_len); in TEST_F()
1066 EXPECT_EQ(memcmp(buf, test_str, send_len), 0); in TEST_F()
1076 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
1080 EXPECT_EQ(poll(&fd, 1, 20), 1); in TEST_F()
1081 EXPECT_EQ(fd.revents & POLLIN, 1); in TEST_F()
1082 EXPECT_EQ(recv(self->cfd, buf, send_len, MSG_WAITALL), send_len); in TEST_F()
1084 EXPECT_EQ(poll(&fd, 1, 20), 0); in TEST_F()
1096 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
1098 EXPECT_EQ(poll(&fd, 1, -1), 1); in TEST_F()
1099 EXPECT_EQ(fd.revents & POLLIN, 1); in TEST_F()
1100 EXPECT_EQ(recv(self->cfd, recv_mem, send_len, MSG_WAITALL), send_len); in TEST_F()
1112 EXPECT_EQ(send(self->fd, send_mem, sizeof(send_mem), 0), in TEST_F()
1115 EXPECT_EQ(poll(&fd, 1, -1), 1); in TEST_F()
1116 EXPECT_EQ(fd.revents & POLLIN, 1); in TEST_F()
1117 EXPECT_EQ(recv(self->cfd, recv_mem, sizeof(recv_mem), MSG_WAITALL), in TEST_F()
1123 EXPECT_EQ(poll(&fd, 1, -1), 1); in TEST_F()
1124 EXPECT_EQ(fd.revents & POLLIN, 1); in TEST_F()
1125 EXPECT_EQ(recv(self->cfd, recv_mem, sizeof(recv_mem), 0), in TEST_F()
1152 EXPECT_EQ(status, 0); in TEST_F()
1153 EXPECT_EQ(res, pid2); in TEST_F()
1183 EXPECT_EQ(setsockopt(self->fd, SOL_SOCKET, SO_SNDBUF, in TEST_F()
1213 EXPECT_EQ(status, 0); in TEST_F()
1214 EXPECT_EQ(res, pid2); in TEST_F()
1275 EXPECT_EQ(status, 0); in test_mutliproc()
1355 EXPECT_EQ(tls_send_cmsg(self->fd, record_type, test_str, send_len, 0), in TEST_F()
1358 EXPECT_EQ(recv(self->cfd, buf, send_len, 0), -1); in TEST_F()
1360 EXPECT_EQ(tls_recv_cmsg(_metadata, self->cfd, record_type, in TEST_F()
1363 EXPECT_EQ(memcmp(buf, test_str, send_len), 0); in TEST_F()
1368 EXPECT_EQ(tls_recv_cmsg(_metadata, self->cfd, record_type, in TEST_F()
1371 EXPECT_EQ(memcmp(buf, test_str, send_len), 0); in TEST_F()
1382 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len); in TEST_F()
1384 EXPECT_EQ(memcmp(buf, test_str, send_len), 0); in TEST_F()
1395 EXPECT_EQ(send(self->fd, test_str, send_len, MSG_MORE), send_len); in TEST_F()
1415 EXPECT_EQ(ret, 0); in TEST_F()
1417 EXPECT_EQ(ret, -1); in TEST_F()
1418 EXPECT_EQ(errno, EINVAL); in TEST_F()
1421 EXPECT_EQ(ret, -1); in TEST_F()
1422 EXPECT_EQ(errno, EISCONN); in TEST_F()
1483 EXPECT_EQ(send(self->fd2, buf, sizeof(buf), 0), sizeof(buf)); in TEST_F()
1484 EXPECT_EQ(recv(self->cfd2, buf, sizeof(buf), 0), -1); in TEST_F()
1485 EXPECT_EQ(errno, EMSGSIZE); in TEST_F()
1486 EXPECT_EQ(recv(self->cfd2, buf, sizeof(buf), MSG_DONTWAIT), -1); in TEST_F()
1487 EXPECT_EQ(errno, EAGAIN); in TEST_F()
1499 EXPECT_EQ(send(self->fd, buf, sizeof(buf) / 2, 0), sizeof(buf) / 2); in TEST_F()
1505 EXPECT_EQ(send(self->fd2, buf, n, 0), n); in TEST_F()
1506 EXPECT_EQ(recv(self->cfd2, buf, sizeof(buf), 0), -1); in TEST_F()
1507 EXPECT_EQ(errno, EBADMSG); in TEST_F()
1508 EXPECT_EQ(recv(self->cfd2, buf, sizeof(buf), 0), -1); in TEST_F()
1509 EXPECT_EQ(errno, EBADMSG); in TEST_F()
1525 EXPECT_EQ(send(self->fd, txt[i], sizeof(txt[i]), 0), in TEST_F()
1532 EXPECT_EQ(send(self->fd2, cip[i], n, 0), n); in TEST_F()
1536 EXPECT_EQ(recv(self->cfd2, buf, sizeof(buf), 0), sizeof(txt[0]) * 2); in TEST_F()
1537 EXPECT_EQ(memcmp(buf, txt[0], sizeof(txt[0])), 0); in TEST_F()
1538 EXPECT_EQ(memcmp(buf + sizeof(txt[0]), txt[1], sizeof(txt[1])), 0); in TEST_F()
1540 EXPECT_EQ(recv(self->cfd2, buf, sizeof(buf), 0), -1); in TEST_F()
1541 EXPECT_EQ(errno, EBADMSG); in TEST_F()
1542 EXPECT_EQ(recv(self->cfd2, buf, sizeof(buf), 0), -1); in TEST_F()
1543 EXPECT_EQ(errno, EBADMSG); in TEST_F()
1560 EXPECT_EQ(send(self->fd, txt, sizeof(txt), 0), sizeof(txt)); in TEST_F()
1563 EXPECT_EQ(send(self->fd2, cip, n, 0), n); in TEST_F()
1565 EXPECT_EQ(tls_send_cmsg(self->fd, 100, test_str, send_len, 0), 10); in TEST_F()
1569 EXPECT_EQ(send(self->fd2, cip, n, 0), n); in TEST_F()
1571 EXPECT_EQ(recv(self->cfd2, buf, sizeof(buf), 0), sizeof(txt)); in TEST_F()
1572 EXPECT_EQ(memcmp(buf, txt, sizeof(txt)), 0); in TEST_F()
1573 EXPECT_EQ(recv(self->cfd2, buf, sizeof(buf), 0), -1); in TEST_F()
1574 EXPECT_EQ(errno, EBADMSG); in TEST_F()
1575 EXPECT_EQ(recv(self->cfd2, buf, sizeof(buf), 0), -1); in TEST_F()
1576 EXPECT_EQ(errno, EBADMSG); in TEST_F()
1604 EXPECT_EQ(ret, -1); in TEST()
1608 EXPECT_EQ(errno, ENOTCONN); in TEST()
1611 EXPECT_EQ(ret, -1); in TEST()
1612 EXPECT_EQ(errno, ENOTCONN); in TEST()
1624 EXPECT_EQ(ret, -1); in TEST()
1625 EXPECT_EQ(errno, EEXIST); in TEST()
1645 EXPECT_EQ(ret, 0); in TEST()
1649 EXPECT_EQ(ret, 0); in TEST()
1704 EXPECT_EQ(len2, len); in TEST()
1705 EXPECT_EQ(memcmp(&addr, &addr2, len), 0); in TEST()