From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH liburing 3/8] test/reg-wait: use queried page_size
Date: Sat, 16 Nov 2024 21:27:43 +0000 [thread overview]
Message-ID: <aec96dc7c43d7479820f686e615f7e949cf7f358.1731792294.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Signed-off-by: Pavel Begunkov <[email protected]>
---
test/reg-wait.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/reg-wait.c b/test/reg-wait.c
index ec90019..6cf47bf 100644
--- a/test/reg-wait.c
+++ b/test/reg-wait.c
@@ -101,7 +101,7 @@ static int test_offsets(struct io_uring *ring)
return T_EXIT_FAIL;
}
- offset = 4096 - sizeof(long);
+ offset = page_size - sizeof(long);
rw = (void *)reg + offset;
memset(rw, 0, sizeof(*rw));
rw->flags = IORING_REG_WAIT_TS;
@@ -259,14 +259,14 @@ static int test_regions(void)
void *buffer;
int ret;
- buffer = aligned_alloc(4096, 4096 * 4);
+ buffer = aligned_alloc(page_size, page_size * 4);
if (!buffer) {
fprintf(stderr, "allocation failed\n");
return T_EXIT_FAIL;
}
rd.user_addr = (__u64)(unsigned long)buffer;
- rd.size = 4096;
+ rd.size = page_size;
rd.flags = IORING_MEM_REGION_TYPE_USER;
mr.region_uptr = (__u64)(unsigned long)&rd;
@@ -286,13 +286,13 @@ static int test_regions(void)
return T_EXIT_FAIL;
}
- rd.size = 4096 * 4;
+ rd.size = page_size * 4;
ret = test_try_register_region(&mr, true);
if (ret) {
fprintf(stderr, "test_try_register_region() 16KB fail %i\n", ret);
return T_EXIT_FAIL;
}
- rd.size = 4096;
+ rd.size = page_size;
rd.user_addr = 0;
ret = test_try_register_region(&mr, true);
@@ -316,7 +316,7 @@ static int test_regions(void)
fprintf(stderr, "test_try_register_region() 0-size fail %i\n", ret);
return T_EXIT_FAIL;
}
- rd.size = 4096;
+ rd.size = page_size;
mr.region_uptr = 0;
ret = test_try_register_region(&mr, true);
--
2.46.0
next prev parent reply other threads:[~2024-11-16 21:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-16 21:27 [PATCH liburing 0/8] region test fixes + improvements Pavel Begunkov
2024-11-16 21:27 ` [PATCH liburing 1/8] test/reg-wait: fix test_regions Pavel Begunkov
2024-11-16 21:27 ` [PATCH liburing 2/8] test/reg-wait: pass right timeout indexes Pavel Begunkov
2024-11-16 21:27 ` Pavel Begunkov [this message]
2024-11-16 21:27 ` [PATCH liburing 4/8] test/reg-wait: skip when R_DISABLED is not supported Pavel Begunkov
2024-11-16 21:27 ` [PATCH liburing 5/8] test/reg-wait: dedup regwait init Pavel Begunkov
2024-11-16 21:27 ` [PATCH liburing 6/8] test/reg-wait: parameterise test_offsets Pavel Begunkov
2024-11-16 21:27 ` [PATCH liburing 7/8] test/reg-wait: add registration helper Pavel Begunkov
2024-11-16 21:27 ` [PATCH liburing 8/8] test/reg-wait: test various sized regions Pavel Begunkov
2024-11-17 16:03 ` [PATCH liburing 0/8] region test fixes + improvements Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aec96dc7c43d7479820f686e615f7e949cf7f358.1731792294.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox