Lines Matching refs:len
218 ssize_t len;
224 while ((len = read(fd, &ch, sizeof(ch))) > 0);
225 if (len < 0) {
248 ssize_t len;
261 len = write(writer_fd, (char *)buffer, sizeof(buffer));
262 if (len < 0) {
267 if (len != sizeof(buffer)) {
269 len);
274 len = read(reader_fd, (char *)buffer, sizeof(buffer));
275 if (len < 0) {
280 if (len != sizeof(buffer)) {
282 len);
315 timed_write(int fd, void *data, size_t len, ssize_t *written_lenp,
330 written_len = write(fd, data, len);
355 timed_read(int fd, void *data, size_t len, ssize_t *read_lenp,
370 read_len = read(fd, data, len);
406 ssize_t len;
426 ret = timed_read(reader_fd, &ch, sizeof(ch), &len, 5, &timedout,
449 ret = timed_read(reader_fd, &ch, sizeof(ch), &len, 5, &timedout,
475 ssize_t len;
495 ret = timed_write(writer_fd, &ch, sizeof(ch), &len, 5, &timedout,
502 if (len != sizeof(ch)) {
504 "%zu, wrote %zd", sizeof(ch), len);
510 ret = timed_read(reader_fd, &ch, sizeof(ch), &len, 5, &timedout,
517 if (len != sizeof(ch)) {
519 "read %zd", sizeof(ch), len);
541 ssize_t len;
557 ret = timed_write(writer_fd, &ch, sizeof(ch), &len, 5, &timedout,
564 if (len != sizeof(ch)) {
566 "%zu, wrote %zd", sizeof(ch), len);
572 ret = timed_read(reader_fd, &ch, sizeof(ch), &len, 5, &timedout,
579 if (len != sizeof(ch)) {
581 "%zd", sizeof(ch), len);
606 ssize_t len;
628 ret = timed_write(writer_fd, buffer, 512*1024, &len, 5, &timedout,
664 ssize_t len;
686 ret = timed_write(writer_fd, buffer, 512*1024, &len, 5, &timedout,
703 if (len == 0 || len >= 512*1024) {
705 "%d, sent %zd", 512*1024, len);
731 ssize_t len;
744 len = write(writer_fd, buffer, 5);
745 if (len < 0) {
750 if (len != 5) {
751 warnx("test_coalesce_big_read: write 5 wrote %zd", len);
756 len = write(writer_fd, buffer + 5, 5);
757 if (len < 0) {
762 if (len != 5) {
763 warnx("test_coalesce_big_read: write 5 wrote %zd", len);
768 len = read(reader_fd, buffer, 10);
769 if (len < 0) {
774 if (len != 10) {
775 warnx("test_coalesce_big_read: read 10 read %zd", len);
802 ssize_t len;
815 len = write(writer_fd, buffer, 10);
816 if (len < 0) {
821 if (len != 10) {
822 warnx("test_coalesce_big_write: write 10 wrote %zd", len);
827 len = read(reader_fd, buffer, 5);
828 if (len < 0) {
833 if (len != 5) {
834 warnx("test_coalesce_big_write: read 5 read %zd", len);
839 len = read(reader_fd, buffer + 5, 5);
840 if (len < 0) {
845 if (len != 5) {
846 warnx("test_coalesce_big_write: read 5 read %zd", len);
1126 ssize_t len;
1158 len = write(writer_fd, &ch, sizeof(ch));
1159 if (len < 0) {
1184 len = read(reader_fd, &ch, sizeof(ch));
1185 if (len < 0) {
1219 ssize_t len;
1258 len = write(writer_fd, buffer, 512*1024);
1259 if (len < 0) {
1303 ssize_t len;
1340 len = write(fd, &ch, sizeof(ch));
1341 if (len < 0) {
1357 len = read(fd, &ch, sizeof(ch));
1358 if (len < 0) {