Lines Matching refs:fd
25 static void test_mod_ssi_write_testfile (int fd, const char *buf, size_t len) in test_mod_ssi_write_testfile() argument
27 if (0 != lseek(fd, 0, SEEK_SET) in test_mod_ssi_write_testfile()
28 || (ssize_t)len != write(fd, buf, len) in test_mod_ssi_write_testfile()
29 || 0 != ftruncate(fd, (off_t)len) in test_mod_ssi_write_testfile()
30 || 0 != lseek(fd, 0, SEEK_SET)) { in test_mod_ssi_write_testfile()
45 int fd = fdevent_mkostemp(fn, 0); in test_mod_ssi_read_fd() local
46 if (fd < 0) { in test_mod_ssi_read_fd()
50 if (0 != fstat(fd, &st)) { in test_mod_ssi_read_fd()
58 test_mod_ssi_write_testfile(fd, ssi_simple, sizeof(ssi_simple)-1); in test_mod_ssi_read_fd()
63 mod_ssi_read_fd(r, hctx, &st, fd); in test_mod_ssi_read_fd()
71 test_mod_ssi_write_testfile(fd, ssi_exec, sizeof(ssi_exec)-1); in test_mod_ssi_read_fd()
73 mod_ssi_read_fd(r, hctx, &st, fd); in test_mod_ssi_read_fd()
77 test_mod_ssi_write_testfile(fd, ssi_exec, sizeof(ssi_exec)-1); in test_mod_ssi_read_fd()
79 mod_ssi_read_fd(r, hctx, &st, fd); in test_mod_ssi_read_fd()
84 if (0 != lseek(cq->first->file.fd, 0, SEEK_SET) in test_mod_ssi_read_fd()
85 || 2 != read(cq->first->file.fd, buf, sizeof(buf))) { in test_mod_ssi_read_fd()
115 test_mod_ssi_write_testfile(fd, BUF_PTR_LEN(b)); in test_mod_ssi_read_fd()
125 mod_ssi_read_fd(r, hctx, &st, fd); in test_mod_ssi_read_fd()
137 close(fd); in test_mod_ssi_read_fd()
151 r.conf.errh->fd = -1; /* (disable) */ in test_mod_ssi()