diff options
-rw-r--r-- | test/500f9fbadef8-test.c | 2 | ||||
-rw-r--r-- | test/accept.c | 6 | ||||
-rw-r--r-- | test/cq-overflow.c | 4 | ||||
-rw-r--r-- | test/d4ae271dfaae-test.c | 6 | ||||
-rw-r--r-- | test/defer.c | 4 | ||||
-rw-r--r-- | test/eeed8b54e0df-test.c | 4 | ||||
-rw-r--r-- | test/fadvise.c | 4 | ||||
-rw-r--r-- | test/file-register.c | 12 | ||||
-rw-r--r-- | test/file-update.c | 4 | ||||
-rw-r--r-- | test/fixed-link.c | 2 | ||||
-rw-r--r-- | test/fsync.c | 4 | ||||
-rw-r--r-- | test/helpers.c | 16 | ||||
-rw-r--r-- | test/helpers.h | 10 | ||||
-rw-r--r-- | test/io-cancel.c | 4 | ||||
-rw-r--r-- | test/io_uring_enter.c | 4 | ||||
-rw-r--r-- | test/io_uring_register.c | 6 | ||||
-rw-r--r-- | test/iopoll.c | 4 | ||||
-rw-r--r-- | test/link_drain.c | 4 | ||||
-rw-r--r-- | test/madvise.c | 4 | ||||
-rw-r--r-- | test/open-close.c | 4 | ||||
-rw-r--r-- | test/openat2.c | 4 | ||||
-rw-r--r-- | test/probe.c | 2 | ||||
-rw-r--r-- | test/read-write.c | 10 | ||||
-rw-r--r-- | test/short-read.c | 4 | ||||
-rw-r--r-- | test/splice.c | 4 | ||||
-rw-r--r-- | test/sq-poll-dup.c | 4 | ||||
-rw-r--r-- | test/sq-poll-share.c | 4 | ||||
-rw-r--r-- | test/statx.c | 2 | ||||
-rw-r--r-- | test/stdout.c | 4 | ||||
-rw-r--r-- | test/submit-reuse.c | 4 | ||||
-rw-r--r-- | test/thread-exit.c | 4 |
31 files changed, 77 insertions, 77 deletions
diff --git a/test/500f9fbadef8-test.c b/test/500f9fbadef8-test.c index 51081c5..dbd5751 100644 --- a/test/500f9fbadef8-test.c +++ b/test/500f9fbadef8-test.c @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) if (argc > 1) return 0; - io_uring_posix_memalign(&iov.iov_base, 4096, 4096); + t_posix_memalign(&iov.iov_base, 4096, 4096); iov.iov_len = 4096; ret = io_uring_queue_init(1, &ring, IORING_SETUP_IOPOLL); diff --git a/test/accept.c b/test/accept.c index a0a8ae6..4305f77 100644 --- a/test/accept.c +++ b/test/accept.c @@ -33,7 +33,7 @@ static void queue_send(struct io_uring *ring, int fd) struct io_uring_sqe *sqe; struct data *d; - d = io_uring_malloc(sizeof(*d)); + d = t_malloc(sizeof(*d)); d->iov.iov_base = d->buf; d->iov.iov_len = sizeof(d->buf); @@ -46,7 +46,7 @@ static void queue_recv(struct io_uring *ring, int fd) struct io_uring_sqe *sqe; struct data *d; - d = io_uring_malloc(sizeof(*d)); + d = t_malloc(sizeof(*d)); d->iov.iov_base = d->buf; d->iov.iov_len = sizeof(d->buf); @@ -247,7 +247,7 @@ static int test_accept_many(unsigned nr, unsigned usecs) ret = io_uring_queue_init(2 * nr, &m_io_uring, 0); assert(ret >= 0); - fds = io_uring_calloc(nr, sizeof(int)); + fds = t_calloc(nr, sizeof(int)); for (i = 0; i < nr; i++) fds[i] = start_accept_listen(NULL, i); diff --git a/test/cq-overflow.c b/test/cq-overflow.c index f116678..274a815 100644 --- a/test/cq-overflow.c +++ b/test/cq-overflow.c @@ -460,9 +460,9 @@ int main(int argc, char *argv[]) return ret; } - io_uring_create_file(".basic-rw", FILE_SIZE); + t_create_file(".basic-rw", FILE_SIZE); - vecs = io_uring_create_buffers(BUFFERS, BS); + vecs = t_create_buffers(BUFFERS, BS); iters = 0; usecs = 1000; diff --git a/test/d4ae271dfaae-test.c b/test/d4ae271dfaae-test.c index 06ec268..5c67d4e 100644 --- a/test/d4ae271dfaae-test.c +++ b/test/d4ae271dfaae-test.c @@ -44,7 +44,7 @@ int main(int argc, char *argv[]) fname = argv[1]; } else { fname = ".sqpoll.tmp"; - io_uring_create_file(fname, FILE_SIZE); + t_create_file(fname, FILE_SIZE); } fd = open(fname, O_RDONLY | O_DIRECT); @@ -53,9 +53,9 @@ int main(int argc, char *argv[]) goto out; } - iovecs = io_uring_calloc(10, sizeof(struct iovec)); + iovecs = t_calloc(10, sizeof(struct iovec)); for (i = 0; i < 10; i++) { - io_uring_posix_memalign(&buf, 4096, 4096); + t_posix_memalign(&buf, 4096, 4096); iovecs[i].iov_base = buf; iovecs[i].iov_len = 4096; } diff --git a/test/defer.c b/test/defer.c index 4151ff9..a8fe8d2 100644 --- a/test/defer.c +++ b/test/defer.c @@ -33,8 +33,8 @@ static int init_context(struct test_context *ctx, struct io_uring *ring, int nr) memset(ctx, 0, sizeof(*ctx)); ctx->nr = nr; ctx->ring = ring; - ctx->sqes = io_uring_malloc(nr * sizeof(*ctx->sqes)); - ctx->cqes = io_uring_malloc(nr * sizeof(*ctx->cqes)); + ctx->sqes = t_malloc(nr * sizeof(*ctx->sqes)); + ctx->cqes = t_malloc(nr * sizeof(*ctx->cqes)); if (!ctx->sqes || !ctx->cqes) goto err; diff --git a/test/eeed8b54e0df-test.c b/test/eeed8b54e0df-test.c index a9c48ab..b6e27cc 100644 --- a/test/eeed8b54e0df-test.c +++ b/test/eeed8b54e0df-test.c @@ -31,7 +31,7 @@ static int get_file_fd(void) return -1; } - buf = io_uring_malloc(BLOCK); + buf = t_malloc(BLOCK); ret = write(fd, buf, BLOCK); if (ret != BLOCK) { if (ret < 0) @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) if (argc > 1) return 0; - iov.iov_base = io_uring_malloc(4096); + iov.iov_base = t_malloc(4096); iov.iov_len = 4096; ret = io_uring_queue_init(2, &ring, 0); diff --git a/test/fadvise.c b/test/fadvise.c index 69dc985..b6d4462 100644 --- a/test/fadvise.c +++ b/test/fadvise.c @@ -119,7 +119,7 @@ static int test_fadvise(struct io_uring *ring, const char *filename) return 1; } - buf = io_uring_malloc(FILE_SIZE); + buf = t_malloc(FILE_SIZE); cached_read = do_read(fd, buf); if (cached_read == -1) @@ -164,7 +164,7 @@ int main(int argc, char *argv[]) fname = argv[1]; } else { fname = ".fadvise.tmp"; - io_uring_create_file(fname, FILE_SIZE); + t_create_file(fname, FILE_SIZE); } if (io_uring_queue_init(8, &ring, 0)) { fprintf(stderr, "ring creation failed\n"); diff --git a/test/file-register.c b/test/file-register.c index 2e08eca..c5c5507 100644 --- a/test/file-register.c +++ b/test/file-register.c @@ -39,7 +39,7 @@ static int *open_files(int nr_files, int extra, int add) int *files; int i; - files = io_uring_calloc(nr_files + extra, sizeof(int)); + files = t_calloc(nr_files + extra, sizeof(int)); for (i = 0; i < nr_files; i++) { if (!add) @@ -157,7 +157,7 @@ static int test_replace_all(struct io_uring *ring) goto err; } - fds = io_uring_malloc(100 * sizeof(int)); + fds = t_malloc(100 * sizeof(int)); for (i = 0; i < 100; i++) fds[i] = -1; @@ -232,7 +232,7 @@ static int test_removals(struct io_uring *ring) goto err; } - fds = io_uring_calloc(10, sizeof(int)); + fds = t_calloc(10, sizeof(int)); for (i = 0; i < 10; i++) fds[i] = -1; @@ -424,11 +424,11 @@ static int test_fixed_read_write(struct io_uring *ring, int index) struct iovec iov[2]; int ret; - iov[0].iov_base = io_uring_malloc(4096); + iov[0].iov_base = t_malloc(4096); iov[0].iov_len = 4096; memset(iov[0].iov_base, 0x5a, 4096); - iov[1].iov_base = io_uring_malloc(4096); + iov[1].iov_base = t_malloc(4096); iov[1].iov_len = 4096; sqe = io_uring_get_sqe(ring); @@ -603,7 +603,7 @@ static int test_sparse_updates(void) return ret; } - fds = io_uring_malloc(256 * sizeof(int)); + fds = t_malloc(256 * sizeof(int)); for (i = 0; i < 256; i++) fds[i] = -1; diff --git a/test/file-update.c b/test/file-update.c index 341005c..38059d4 100644 --- a/test/file-update.c +++ b/test/file-update.c @@ -37,7 +37,7 @@ static int *open_files(int nr_files, int extra, int add) int *files; int i; - files = io_uring_calloc(nr_files + extra, sizeof(int)); + files = t_calloc(nr_files + extra, sizeof(int)); for (i = 0; i < nr_files; i++) { if (!add) @@ -108,7 +108,7 @@ static int test_sqe_update(struct io_uring *ring) struct io_uring_cqe *cqe; int *fds, i, ret; - fds = io_uring_malloc(sizeof(int) * 10); + fds = t_malloc(sizeof(int) * 10); for (i = 0; i < 10; i++) fds[i] = -1; diff --git a/test/fixed-link.c b/test/fixed-link.c index a7c3a5e..60d96ec 100644 --- a/test/fixed-link.c +++ b/test/fixed-link.c @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) } for (i = 0; i < IOVECS_LEN; ++i) { - iovecs[i].iov_base = io_uring_malloc(64); + iovecs[i].iov_base = t_malloc(64); iovecs[i].iov_len = 64; }; diff --git a/test/fsync.c b/test/fsync.c index 5aa5a83..7e93ecc 100644 --- a/test/fsync.c +++ b/test/fsync.c @@ -70,7 +70,7 @@ static int test_barrier_fsync(struct io_uring *ring) } for (i = 0; i < 4; i++) { - iovecs[i].iov_base = io_uring_malloc(4096); + iovecs[i].iov_base = t_malloc(4096); iovecs[i].iov_len = 4096; } @@ -144,7 +144,7 @@ static int test_sync_file_range(struct io_uring *ring) struct io_uring_sqe *sqe; struct io_uring_cqe *cqe; - io_uring_create_file(".sync_file_range", FILE_SIZE); + t_create_file(".sync_file_range", FILE_SIZE); fd = open(".sync_file_range", O_RDWR); save_errno = errno; diff --git a/test/helpers.c b/test/helpers.c index a2b98db..ea705fb 100644 --- a/test/helpers.c +++ b/test/helpers.c @@ -15,7 +15,7 @@ /* * Helper for allocating memory in tests. */ -void *io_uring_malloc(size_t size) +void *t_malloc(size_t size) { void *ret; ret = malloc(size); @@ -26,7 +26,7 @@ void *io_uring_malloc(size_t size) /* * Helper for allocating size bytes aligned on a boundary. */ -void io_uring_posix_memalign(void **memptr, size_t alignment, size_t size) +void t_posix_memalign(void **memptr, size_t alignment, size_t size) { int ret; ret = posix_memalign(memptr, alignment, size); @@ -37,7 +37,7 @@ void io_uring_posix_memalign(void **memptr, size_t alignment, size_t size) * Helper for allocating space for an array of nmemb elements * with size bytes for each element. */ -void *io_uring_calloc(size_t nmemb, size_t size) +void *t_calloc(size_t nmemb, size_t size) { void *ret; ret = calloc(nmemb, size); @@ -48,13 +48,13 @@ void *io_uring_calloc(size_t nmemb, size_t size) /* * Helper for creating file and write @size byte buf with 0xaa value in the file. */ -void io_uring_create_file(const char *file, size_t size) +void t_create_file(const char *file, size_t size) { ssize_t ret; char *buf; int fd; - buf = io_uring_malloc(size); + buf = t_malloc(size); memset(buf, 0xaa, size); fd = open(file, O_WRONLY | O_CREAT, 0644); @@ -71,14 +71,14 @@ void io_uring_create_file(const char *file, size_t size) * Helper for creating @buf_num number of iovec * with @buf_size bytes buffer of each iovec. */ -struct iovec *io_uring_create_buffers(size_t buf_num, size_t buf_size) +struct iovec *t_create_buffers(size_t buf_num, size_t buf_size) { struct iovec *vecs; int i; - vecs = io_uring_malloc(buf_num * sizeof(struct iovec)); + vecs = t_malloc(buf_num * sizeof(struct iovec)); for (i = 0; i < buf_num; i++) { - io_uring_posix_memalign(&vecs[i].iov_base, buf_size, buf_size); + t_posix_memalign(&vecs[i].iov_base, buf_size, buf_size); vecs[i].iov_len = buf_size; } return vecs; diff --git a/test/helpers.h b/test/helpers.h index e6190ac..afe157c 100644 --- a/test/helpers.h +++ b/test/helpers.h @@ -12,32 +12,32 @@ extern "C" { /* * Helper for allocating memory in tests. */ -void *io_uring_malloc(size_t size); +void *t_malloc(size_t size); /* * Helper for allocating size bytes aligned on a boundary. */ -void io_uring_posix_memalign(void **memptr, size_t alignment, size_t size); +void t_posix_memalign(void **memptr, size_t alignment, size_t size); /* * Helper for allocating space for an array of nmemb elements * with size bytes for each element. */ -void *io_uring_calloc(size_t nmemb, size_t size); +void *t_calloc(size_t nmemb, size_t size); /* * Helper for creating file and write @size byte buf with 0xaa value in the file. */ -void io_uring_create_file(const char *file, size_t size); +void t_create_file(const char *file, size_t size); /* * Helper for creating @buf_num number of iovec * with @buf_size bytes buffer of each iovec. */ -struct iovec *io_uring_create_buffers(size_t buf_num, size_t buf_size); +struct iovec *t_create_buffers(size_t buf_num, size_t buf_size); #ifdef __cplusplus } #endif diff --git a/test/io-cancel.c b/test/io-cancel.c index 1deb430..72ac971 100644 --- a/test/io-cancel.c +++ b/test/io-cancel.c @@ -203,9 +203,9 @@ int main(int argc, char *argv[]) if (argc > 1) return 0; - io_uring_create_file(".basic-rw", FILE_SIZE); + t_create_file(".basic-rw", FILE_SIZE); - vecs = io_uring_create_buffers(BUFFERS, BS); + vecs = t_create_buffers(BUFFERS, BS); for (i = 0; i < 4; i++) { int v1 = (i & 1) != 0; diff --git a/test/io_uring_enter.c b/test/io_uring_enter.c index 698e37c..a6bb8f5 100644 --- a/test/io_uring_enter.c +++ b/test/io_uring_enter.c @@ -126,10 +126,10 @@ io_prep_read(struct io_uring_sqe *sqe, int fd, off_t offset, size_t len) { struct iovec *iov; - iov = io_uring_malloc(sizeof(*iov)); + iov = t_malloc(sizeof(*iov)); assert(iov); - iov->iov_base = io_uring_malloc(len); + iov->iov_base = t_malloc(len); assert(iov->iov_base); iov->iov_len = len; diff --git a/test/io_uring_register.c b/test/io_uring_register.c index a45967b..7bcb036 100644 --- a/test/io_uring_register.c +++ b/test/io_uring_register.c @@ -242,7 +242,7 @@ test_memlock_exceeded(int fd) return 0; iov.iov_len = mlock_limit * 2; - buf = io_uring_malloc(iov.iov_len); + buf = t_malloc(iov.iov_len); iov.iov_base = buf; while (iov.iov_len) { @@ -284,8 +284,8 @@ test_iovec_nr(int fd) struct iovec *iovs; void *buf; - buf = io_uring_malloc(pagesize); - iovs = io_uring_malloc(nr * sizeof(struct iovec)); + buf = t_malloc(pagesize); + iovs = t_malloc(nr * sizeof(struct iovec)); for (i = 0; i < nr; i++) { iovs[i].iov_base = buf; diff --git a/test/iopoll.c b/test/iopoll.c index 4ddc646..3d94dfe 100644 --- a/test/iopoll.c +++ b/test/iopoll.c @@ -334,10 +334,10 @@ int main(int argc, char *argv[]) fname = argv[1]; } else { fname = ".iopoll-rw"; - io_uring_create_file(fname, FILE_SIZE); + t_create_file(fname, FILE_SIZE); } - vecs = io_uring_create_buffers(BUFFERS, BS); + vecs = t_create_buffers(BUFFERS, BS); nr = 16; if (no_buf_select) diff --git a/test/link_drain.c b/test/link_drain.c index 45b1469..a50fe88 100644 --- a/test/link_drain.c +++ b/test/link_drain.c @@ -29,7 +29,7 @@ static int test_link_drain_one(struct io_uring *ring) return 1; } - iovecs.iov_base = io_uring_malloc(4096); + iovecs.iov_base = t_malloc(4096); iovecs.iov_len = 4096; for (i = 0; i < 5; i++) { @@ -112,7 +112,7 @@ int test_link_drain_multi(struct io_uring *ring) return 1; } - iovecs.iov_base = io_uring_malloc(4096); + iovecs.iov_base = t_malloc(4096); iovecs.iov_len = 4096; for (i = 0; i < 9; i++) { diff --git a/test/madvise.c b/test/madvise.c index c06465f..89057af 100644 --- a/test/madvise.c +++ b/test/madvise.c @@ -104,7 +104,7 @@ static int test_madvise(struct io_uring *ring, const char *filename) return 1; } - buf = io_uring_malloc(FILE_SIZE); + buf = t_malloc(FILE_SIZE); ptr = mmap(NULL, FILE_SIZE, PROT_READ, MAP_PRIVATE, fd, 0); if (ptr == MAP_FAILED) { @@ -159,7 +159,7 @@ int main(int argc, char *argv[]) fname = argv[1]; } else { fname = ".madvise.tmp"; - io_uring_create_file(fname, FILE_SIZE); + t_create_file(fname, FILE_SIZE); } if (io_uring_queue_init(8, &ring, 0)) { diff --git a/test/open-close.c b/test/open-close.c index 6d44c6a..648737c 100644 --- a/test/open-close.c +++ b/test/open-close.c @@ -100,10 +100,10 @@ int main(int argc, char *argv[]) do_unlink = 1; } - io_uring_create_file(path, 4096); + t_create_file(path, 4096); if (do_unlink) - io_uring_create_file(path_rel, 4096); + t_create_file(path_rel, 4096); ret = test_openat(&ring, path, -1); if (ret < 0) { diff --git a/test/openat2.c b/test/openat2.c index 750a2b4..65f81b1 100644 --- a/test/openat2.c +++ b/test/openat2.c @@ -69,10 +69,10 @@ int main(int argc, char *argv[]) do_unlink = 1; } - io_uring_create_file(path, 4096); + t_create_file(path, 4096); if (do_unlink) - io_uring_create_file(path_rel, 4096); + t_create_file(path_rel, 4096); ret = test_openat2(&ring, path, -1); if (ret < 0) { diff --git a/test/probe.c b/test/probe.c index 0881240..c7fc053 100644 --- a/test/probe.c +++ b/test/probe.c @@ -68,7 +68,7 @@ static int test_probe(struct io_uring *ring) int ret; len = sizeof(*p) + 256 * sizeof(struct io_uring_probe_op); - p = io_uring_calloc(1, len); + p = t_calloc(1, len); ret = io_uring_register_probe(ring, p, 0); if (ret == -EINVAL) { fprintf(stdout, "Probe not supported, skipping\n"); diff --git a/test/read-write.c b/test/read-write.c index 4a331d5..d0a77fa 100644 --- a/test/read-write.c +++ b/test/read-write.c @@ -29,9 +29,9 @@ static int create_nonaligned_buffers(void) { int i; - vecs = io_uring_malloc(BUFFERS * sizeof(struct iovec)); + vecs = t_malloc(BUFFERS * sizeof(struct iovec)); for (i = 0; i < BUFFERS; i++) { - char *p = io_uring_malloc(3 * BS); + char *p = t_malloc(3 * BS); if (!p) return 1; @@ -332,7 +332,7 @@ static int has_nonvec_read(void) exit(ret); } - p = io_uring_calloc(1, sizeof(*p) + 256 * sizeof(struct io_uring_probe_op)); + p = t_calloc(1, sizeof(*p) + 256 * sizeof(struct io_uring_probe_op)); ret = io_uring_register_probe(&ring, p, 256); /* if we don't have PROBE_REGISTER, we don't have OP_READ/WRITE */ if (ret == -EINVAL) { @@ -752,10 +752,10 @@ int main(int argc, char *argv[]) fname = argv[1]; } else { fname = ".basic-rw"; - io_uring_create_file(fname, FILE_SIZE); + t_create_file(fname, FILE_SIZE); } - vecs = io_uring_create_buffers(BUFFERS, BS); + vecs = t_create_buffers(BUFFERS, BS); /* if we don't have nonvec read, skip testing that */ nr = has_nonvec_read() ? 32 : 16; diff --git a/test/short-read.c b/test/short-read.c index c839799..02eee04 100644 --- a/test/short-read.c +++ b/test/short-read.c @@ -26,10 +26,10 @@ int main(int argc, char *argv[]) if (argc > 1) return 0; - vec.iov_base = io_uring_malloc(BUF_SIZE); + vec.iov_base = t_malloc(BUF_SIZE); vec.iov_len = BUF_SIZE; - io_uring_create_file(".short-read", FILE_SIZE); + t_create_file(".short-read", FILE_SIZE); fd = open(".short-read", O_RDONLY); save_errno = errno; diff --git a/test/splice.c b/test/splice.c index 0834aa3..f4f0c9c 100644 --- a/test/splice.c +++ b/test/splice.c @@ -87,8 +87,8 @@ static int init_splice_ctx(struct test_ctx *ctx) { int ret, rnd_fd; - ctx->buf_in = io_uring_calloc(BUF_SIZE, 1); - ctx->buf_out = io_uring_calloc(BUF_SIZE, 1); + ctx->buf_in = t_calloc(BUF_SIZE, 1); + ctx->buf_out = t_calloc(BUF_SIZE, 1); ctx->fd_in = create_file(".splice-test-in"); if (ctx->fd_in < 0) { diff --git a/test/sq-poll-dup.c b/test/sq-poll-dup.c index a6e50f0..eeb619c 100644 --- a/test/sq-poll-dup.c +++ b/test/sq-poll-dup.c @@ -161,10 +161,10 @@ int main(int argc, char *argv[]) fname = argv[1]; } else { fname = ".basic-rw"; - io_uring_create_file(fname, FILE_SIZE); + t_create_file(fname, FILE_SIZE); } - vecs = io_uring_create_buffers(BUFFERS, BS); + vecs = t_create_buffers(BUFFERS, BS); fd = open(fname, O_RDONLY | O_DIRECT); if (fd < 0) { diff --git a/test/sq-poll-share.c b/test/sq-poll-share.c index 4f1192d..a46b94f 100644 --- a/test/sq-poll-share.c +++ b/test/sq-poll-share.c @@ -83,10 +83,10 @@ int main(int argc, char *argv[]) fname = argv[1]; } else { fname = ".basic-rw"; - io_uring_create_file(fname, FILE_SIZE); + t_create_file(fname, FILE_SIZE); } - vecs = io_uring_create_buffers(BUFFERS, BS); + vecs = t_create_buffers(BUFFERS, BS); fd = open(fname, O_RDONLY | O_DIRECT); if (fd < 0) { diff --git a/test/statx.c b/test/statx.c index bd8b5a3..c0f9e9c 100644 --- a/test/statx.c +++ b/test/statx.c @@ -143,7 +143,7 @@ int main(int argc, char *argv[]) fname = argv[1]; } else { fname = "/tmp/.statx"; - io_uring_create_file(fname, 4096); + t_create_file(fname, 4096); } ret = test_statx(&ring, fname); diff --git a/test/stdout.c b/test/stdout.c index 6380e1b..ade100a 100644 --- a/test/stdout.c +++ b/test/stdout.c @@ -21,7 +21,7 @@ static int test_pipe_io_fixed(struct io_uring *ring) char buffer[128]; int i, ret, fds[2]; - io_uring_posix_memalign(&vecs[0].iov_base, 4096, 4096); + t_posix_memalign(&vecs[0].iov_base, 4096, 4096); memcpy(vecs[0].iov_base, str, strlen(str)); vecs[0].iov_len = strlen(str); @@ -102,7 +102,7 @@ static int test_stdout_io_fixed(struct io_uring *ring) struct iovec vecs; int ret; - io_uring_posix_memalign(&vecs.iov_base, 4096, 4096); + t_posix_memalign(&vecs.iov_base, 4096, 4096); memcpy(vecs.iov_base, str, strlen(str)); vecs.iov_len = strlen(str); diff --git a/test/submit-reuse.c b/test/submit-reuse.c index 3c09d8d..74ba769 100644 --- a/test/submit-reuse.c +++ b/test/submit-reuse.c @@ -158,9 +158,9 @@ static int test_reuse(int argc, char *argv[], int split, int async) } if (do_unlink) - io_uring_create_file(fname1, FILE_SIZE); + t_create_file(fname1, FILE_SIZE); - io_uring_create_file(".reuse.2", FILE_SIZE); + t_create_file(".reuse.2", FILE_SIZE); fd1 = open(fname1, O_RDONLY); if (fd1 < 0) { diff --git a/test/thread-exit.c b/test/thread-exit.c index dc9bfaf..c2f2148 100644 --- a/test/thread-exit.c +++ b/test/thread-exit.c @@ -35,7 +35,7 @@ static void *do_io(void *data) char *buffer; int ret; - buffer = io_uring_malloc(WSIZE); + buffer = t_malloc(WSIZE); memset(buffer, 0x5a, WSIZE); sqe = io_uring_get_sqe(d->ring); if (!sqe) { @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) } if (do_unlink) - io_uring_create_file(fname, 4096); + t_create_file(fname, 4096); fd = open(fname, O_WRONLY); if (fd < 0) { |