public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: Pavel Begunkov <[email protected]>
Cc: Jens Axboe <[email protected]>,
	io-uring Mailing List <[email protected]>
Subject: Re: [PATCH liburing 3/4] tests: add tests for zerocopy send and notifications
Date: Mon, 25 Jul 2022 17:35:59 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <92dccd4b172d5511646d72c51205241aa2e62458.1658743360.git.asml.silence@gmail.com>

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?

> +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;"

> +	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...

-- 
Ammar Faizi

  reply	other threads:[~2022-07-25 10:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 10:03 [PATCH liburing 0/4] zerocopy send headers and tests Pavel Begunkov
2022-07-25 10:03 ` [PATCH liburing 1/4] io_uring.h: sync with kernel for zc send and notifiers Pavel Begunkov
2022-07-25 10:03 ` [PATCH liburing 2/4] liburing: add zc send and notif helpers Pavel Begunkov
2022-07-25 10:20   ` Ammar Faizi
2022-07-25 11:18     ` Pavel Begunkov
2022-07-25 10:03 ` [PATCH liburing 3/4] tests: add tests for zerocopy send and notifications Pavel Begunkov
2022-07-25 10:35   ` Ammar Faizi [this message]
2022-07-25 11:28     ` Pavel Begunkov
2022-07-25 12:08       ` Ammar Faizi
2022-07-25 14:07         ` Pavel Begunkov
2022-07-25 18:55         ` Eli Schwartz
2022-07-25 23:37           ` Jens Axboe
2022-07-26  9:35             ` Ammar Faizi
2022-07-25 10:03 ` [PATCH liburing 4/4] examples: add a zerocopy send example Pavel Begunkov

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [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