All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 3/3] syscalls/io_submit: Add io_submit02 test for native AIO
Date: Mon, 7 Jun 2021 15:22:00 +0200	[thread overview]
Message-ID: <YL4deOp77fYs40Jw@yuki> (raw)
In-Reply-To: <20210507083321.167998-4-xieziyao@huawei.com>

Hi!
> +	TEST(tst_syscall(__NR_io_submit, *tc[i].ctx, tc[i].nr, tc[i].iocbs));
> +	tst_res(TST_ERR == tc[i].exp_errno ? TPASS : TFAIL,
> +		"io_submit(2) with %s returns %s, expected %s",
> +		tc[i].desc, tst_strerrno(TST_ERR), tst_strerrno(tc[i].exp_errno));

I do not like this tst_res() that much. Can we rather do:

	if (tc[i].exp_errno)
		TST_EXP_FAIL(...);
	else
		TST_EXP_PASS(...);

Another possibility would be splitting the test into two one for
negative and one for positive cases.


And we need the .needs_kconfig in this test as well.

-- 
Cyril Hrubis
chrubis@suse.cz

      reply	other threads:[~2021-06-07 13:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  8:33 [LTP] [PATCH 0/3] syscalls/aio: Add testcases for native AIO Xie Ziyao
2021-05-07  8:33 ` [LTP] [PATCH 1/3] syscalls/io_destroy: Add io_destroy02 test " Xie Ziyao
2021-06-07 13:15   ` Cyril Hrubis
2021-05-07  8:33 ` [LTP] [PATCH 2/3] syscalls/io_setup: Add io_setup02 " Xie Ziyao
2021-06-07 13:18   ` Cyril Hrubis
2021-05-07  8:33 ` [LTP] [PATCH 3/3] syscalls/io_submit: Add io_submit02 " Xie Ziyao
2021-06-07 13:22   ` Cyril Hrubis [this message]

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=YL4deOp77fYs40Jw@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.