All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avinesh Kumar <akumar@suse.de>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] write05: Simplify test using TST_ macros
Date: Fri, 21 Jul 2023 17:59:05 +0530	[thread overview]
Message-ID: <4864592.31r3eYUQgx@localhost> (raw)
In-Reply-To: <20230721100330.1366932-1-pvorel@suse.cz>

Hi Petr,

On Friday, July 21, 2023 3:33:30 PM IST Petr Vorel wrote:
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/kernel/syscalls/write/write05.c | 20 +++-----------------
>  1 file changed, 3 insertions(+), 17 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/write/write05.c
> b/testcases/kernel/syscalls/write/write05.c index c1e48f1df..1e85cce6d
> 100644
> --- a/testcases/kernel/syscalls/write/write05.c
> +++ b/testcases/kernel/syscalls/write/write05.c
> @@ -59,26 +59,12 @@ static void verify_write(unsigned int i)
> 
>  	sigpipe_cnt = 0;
> 
> -	TEST(write(*tc->fd, *tc->buf, tc->size));
> -
> -	if (TST_RET != -1) {
> -		tst_res(TFAIL, "write() succeeded unexpectedly");
> -		return;
> -	}
> -
> -	if (TST_ERR != tc->exp_errno) {
> -		tst_res(TFAIL | TTERRNO,
> -			"write() failed unexpectedly, expected %s",
> -			tst_strerrno(tc->exp_errno));
> +	TST_EXP_FAIL(write(*tc->fd, *tc->buf, tc->size), tc->exp_errno);
Should we use TST_EXP_FAIL2 instead?

Maybe we can also do the ascii doc changes and headers cleanup, but I'm fine if 
we do that in a separate patch.

Reviewed-by: Avinesh Kumar <akumar@suse.de>


Regards,
Avinesh




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

  reply	other threads:[~2023-07-21 12:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 10:03 [LTP] [PATCH 1/1] write05: Simplify test using TST_ macros Petr Vorel
2023-07-21 12:29 ` Avinesh Kumar [this message]
2023-07-21 14:31   ` Petr Vorel

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=4864592.31r3eYUQgx@localhost \
    --to=akumar@suse.de \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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.