Linux io-uring development
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <krisman@suse.de>
To: Prateek <kprateek283@gmail.com>, io-uring@vger.kernel.org
Cc: axboe@kernel.dk, Prateek <kprateek283@gmail.com>
Subject: Re: [PATCH 2/2] test/timeout-swallow: verify -ETIME is not swallowed
Date: Tue, 14 Jul 2026 12:20:25 -0400	[thread overview]
Message-ID: <87cxwp4k6u.fsf@mailhost.krisman.be> (raw)
In-Reply-To: <20260712221222.535794-1-kprateek283@gmail.com>

Prateek <kprateek283@gmail.com> writes:

> Regression test for the previous commit. Submits an SQE and waits with a
> zero timeout for more completions than can arrive; the result must be
> -ETIME, not the positive submit count. Covers the normal EXT_ARG wait
> path and the registered-wait path, each skipped gracefully where
> unsupported.
>
> Signed-off-by: Prateek <kprateek283@gmail.com>
> ---
>  test/Makefile          |   1 +
>  test/timeout-swallow.c | 117 +++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 118 insertions(+)
>  create mode 100644 test/timeout-swallow.c
>
> diff --git a/test/Makefile b/test/Makefile
> index d6358a93..ae23ef6d 100644
> --- a/test/Makefile
> +++ b/test/Makefile
> @@ -293,6 +293,7 @@ test_srcs := \
>  	timerfd-short-read.c \
>  	timeout.c \
>  	timeout-new.c \
> +	timeout-swallow.c \
>  	timestamp.c \
>  	timestamp-bug.c \
>  	truncate.c \
> diff --git a/test/timeout-swallow.c b/test/timeout-swallow.c
> new file mode 100644
> index 00000000..9fb4ab01
> --- /dev/null
> +++ b/test/timeout-swallow.c
> @@ -0,0 +1,117 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Description: tests that io_uring_wait_cqes() and variants do not swallow 
> + *              -ETIME when loop-fetching CQEs if some SQEs were submitted.
> + */
> +#include <stdio.h>
> +#include <unistd.h>
> +#include <errno.h>
> +#include <sys/time.h>
> +#include "liburing.h"
> +#include "helpers.h"
> +
> +/*
> + * Test the normal -ETIME swallow path. (line 118 in queue.c)

This type of comment is useless as line number changes.  Better to refer to
function name in the API and describe the situation or not have anything
at all.  Other than that,


Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>




-- 
Gabriel Krisman Bertazi

  reply	other threads:[~2026-07-14 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-12 22:10 [PATCH 1/2] src/queue: don't swallow -ETIME when SQEs were submitted Prateek
2026-07-12 22:12 ` [PATCH 2/2] test/timeout-swallow: verify -ETIME is not swallowed Prateek
2026-07-14 16:20   ` Gabriel Krisman Bertazi [this message]
2026-07-14 16:15 ` [PATCH 1/2] src/queue: don't swallow -ETIME when SQEs were submitted Gabriel Krisman Bertazi

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=87cxwp4k6u.fsf@mailhost.krisman.be \
    --to=krisman@suse.de \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=kprateek283@gmail.com \
    /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