[LTP] [PATCH 3/3] fdatasync03: add [Description] tag and cleanup code
Cyril Hrubis
chrubis@suse.cz
Wed Mar 13 17:14:31 CET 2024
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
More information about the ltp
mailing list