public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Wei Gao" <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v5] io_submit04: Add test case for RWF_NOWAIT flag
Date: Tue, 17 Mar 2026 09:54:30 +0000	[thread overview]
Message-ID: <69b924d7.050a0220.3d315b.23bd@mx.google.com> (raw)
In-Reply-To: <20260317074340.589-1-wegao@suse.com>

Hi Wei,

Thanks for the patch. I have a few issues to address before this can
be merged.

> diff --git a/include/lapi/aio_abi.h b/include/lapi/aio_abi.h
> +struct iocb_fallback {
> +        uint64_t aio_data;
> +#if __BYTE_ORDER == __LITTLE_ENDIAN
> +        uint32_t   aio_key;
> +        uint32_t aio_rw_flags;

The struct body uses spaces for indentation instead of tabs. Please
convert to tabs to match the kernel coding style used in other lapi
headers.

> +static void cleanup(void)
> +{
> +   if (fd[0])
> +           SAFE_CLOSE(fd[0]);
> +
> +   if (fd[1])
> +           SAFE_CLOSE(fd[1]);

fd is initialised to {-1, -1}. The check `if (fd[0])` is truthy for
-1, so if setup() aborts before SAFE_PIPE() (e.g. io_setup fails),
cleanup will call SAFE_CLOSE(-1) which fails with EBADF and triggers
a spurious TBROK. Use the standard LTP pattern:

    if (fd[0] != -1)
        SAFE_CLOSE(fd[0]);

    if (fd[1] != -1)
        SAFE_CLOSE(fd[1]);

> +   TEST(tst_syscall(__NR_io_submit, ctx, nr, iocbs));
> +
> +   if (TST_RET == -1 && errno == EOPNOTSUPP) {

After the TEST() macro, use TST_ERR instead of bare errno:

    if (TST_RET == -1 && TST_ERR == EOPNOTSUPP) {

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-03-17  9:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-29  1:27 [LTP] [PATCH v1] io_submit04: Add test case for RWF_NOWAIT flag Wei Gao via ltp
2024-02-06 15:59 ` Petr Vorel
2025-10-22  2:05 ` [LTP] [PATCH v2] " Wei Gao via ltp
2025-12-18 13:21   ` Andrea Cervesato via ltp
2025-12-24  8:49   ` [LTP] [PATCH v3] " Wei Gao via ltp
2026-01-05 12:53     ` Andrea Cervesato via ltp
2026-01-06  6:26       ` Wei Gao via ltp
2026-01-06  8:39         ` Andrea Cervesato via ltp
2026-01-06  8:39         ` Petr Vorel
2026-01-07  8:53           ` Jan Stancek via ltp
2026-01-07  6:10     ` [LTP] [PATCH v4] " Wei Gao via ltp
2026-02-18 12:21       ` Andrea Cervesato via ltp
2026-03-05  4:41         ` Wei Gao via ltp
2026-03-17  7:43       ` [LTP] [PATCH v5] " Wei Gao via ltp
2026-03-17  9:54         ` Andrea Cervesato via ltp [this message]
2026-03-17 11:46         ` [LTP] [PATCH v6] " Wei Gao via ltp
2026-03-20 12:54           ` Andrea Cervesato via ltp
2026-03-27 18:17           ` Petr Vorel
2026-03-30  8:08             ` Wei Gao via ltp
2026-04-04  1:00             ` Wei Gao via ltp
2026-03-31 11:18           ` [LTP] [PATCH v7] fanotify22.c: handle multiple asynchronous error events Wei Gao via ltp
2026-04-04  1:13           ` [LTP] [PATCH v7] io_submit04: Add test case for RWF_NOWAIT flag Wei Gao via ltp

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=69b924d7.050a0220.3d315b.23bd@mx.google.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=wegao@suse.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