On 7/25/22 11:35, Ammar Faizi wrote:
On 7/25/22 5:03 PM, Pavel Begunkov wrote:> diff --git a/test/Makefile b/test/Makefile
index 8945368..7b6018c 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -175,6 +175,7 @@ test_srcs := \
xattr.c \
skip-cqe.c \
single-issuer.c \
+ send-zcopy.c \
# EOL
I have been trying to keep this list sorted alphabetically. Can we?
Don't see any reason for that, especially since it's not sorted.
+int main(int argc, char *argv[])
+{
+ struct io_uring ring;
+ int i, ret, sp[2];
+
+ if (argc > 1)
+ return 0;
New test should use the provided exit code protocol. This should have
been "return T_EXIT_SKIP;"
Oh, I already hate those rules, sounds like they were specifically
honed to make patching harder. By the way, while we're at it,
what is T_EXIT_ERROR? Why it's not used anywhere and how it's
different from T_EXIT_FAIL?
+ ret = io_uring_queue_init(32, &ring, 0);
+ if (ret) {
+ fprintf(stderr, "queue init failed: %d\n", ret);
+ return 1;
+ }
This should have been "return T_EXIT_FAIL;".
+ ret = register_notifications(&ring);
+ if (ret == -EINVAL) {
+ printf("sendzc is not supported, skip\n");
+ return 0;
+ } else if (ret) {
+ fprintf(stderr, "register notif failed %i\n", ret);
+ return 1;
+ }
[...]
+
+out:
+ io_uring_queue_exit(&ring);
+ close(sp[0]);
+ close(sp[1]);
+ return 0;
+}
and so on...
--
Pavel Begunkov