public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 3/3] fdatasync03: add [Description] tag and cleanup code
Date: Wed, 13 Mar 2024 17:14:31 +0100	[thread overview]
Message-ID: <ZfHQ5zpMZntW5hSD@yuki> (raw)
In-Reply-To: <20240126040139.2534873-3-ruansy.fnst@fujitsu.com>

Hi!
> +/*\
> + * [Description]
>   *
>   * It basically tests fdatasync() to sync test file data having large dirty
>   * file pages to block device. Also, it tests all supported filesystems on a
> @@ -37,10 +37,7 @@ static void verify_fdatasync(void)
>  
>  	tst_fill_fd(fd, 0, TST_MB, FILE_SIZE_MB);
>  
> -	TEST(fdatasync(fd));
> -
> -	if (TST_RET)
> -		tst_brk(TFAIL | TTERRNO, "fdatasync(fd) failed");
> +	TST_EXP_PASS_SILENT(fdatasync(fd));

There is a subtle difference the TST_EXP_PASS_SILENT() does not exit the
function as the tst_brk() does, so this should be:

	TST_EXP_PASS_SILENT(fdatasync(fd));

	if (!TST_PASS)
		return;

So that we do not continue with the test if the fdatasync() failed.

>  	written = tst_dev_bytes_written(tst_device->dev);
>  
> -- 
> 2.34.1
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2024-03-13 16:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26  4:01 [LTP] [PATCH 1/3] fdatasync01: Convert to new API Shiyang Ruan
2024-01-26  4:01 ` [LTP] [PATCH 2/3] fdatasync02: " Shiyang Ruan
2024-03-13 16:08   ` Cyril Hrubis
2024-01-26  4:01 ` [LTP] [PATCH 3/3] fdatasync03: add [Description] tag and cleanup code Shiyang Ruan
2024-03-13 16:14   ` Cyril Hrubis [this message]
2024-03-13 16:04 ` [LTP] [PATCH 1/3] fdatasync01: Convert to new API Cyril Hrubis

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=ZfHQ5zpMZntW5hSD@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=ruansy.fnst@fujitsu.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