Re: [PATCH v3 3/4] tree: Use TST_EXP_PASS_OR_FAIL() and TST_EXP_FD_OR_FAIL()
Andrea Cervesato via ltp <[email protected]>
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <[email protected]> |
> Therefore I suggest to merge with changes below (removed O_TRUNC and move fd =
> to the beginning).
>
> > Kind regards,
> > Petr
>
> +++ testcases/kernel/syscalls/landlock/landlock_tester.h
> @@ -254,13 +254,13 @@ static void _test_truncate(const int exp_err)
> tst_res(TINFO, "Test truncating file");
>
> TST_EXP_PASS_OR_FAIL(truncate(FILE_TRUNCATE, 10), exp_err);
> - TST_EXP_FD_OR_FAIL(fd = open(FILE_TRUNCATE, O_WRONLY | O_TRUNC, PERM_MODE), exp_err);
> + fd = TST_EXP_FD_OR_FAIL(open(FILE_TRUNCATE, O_WRONLY, PERM_MODE), exp_err);
> if (fd != -1) {
> TST_EXP_PASS_OR_FAIL(ftruncate(fd, 10), exp_err);
> SAFE_CLOSE(fd);
> }
>
> - TST_EXP_FD_OR_FAIL(fd = open(FILE_TRUNCATE, O_WRONLY | O_TRUNC, PERM_MODE), exp_err);
> + fd = TST_EXP_FD_OR_FAIL(open(FILE_TRUNCATE, O_WRONLY | O_TRUNC, PERM_MODE), exp_err);
> if (fd != -1)
> SAFE_CLOSE(TST_RET);
> }
+1
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato-IBi9RG/[email protected]
--
Mailing list info: https://lists.linux.it/listinfo/ltp