From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Petr Vorel" <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 3/4] tree: Use TST_EXP_PASS_OR_FAIL() and TST_EXP_FD_OR_FAIL()
Date: Thu, 20 Aug 2026 07:52:23 +0000 [thread overview]
Message-ID: <6a86b238.80d8f3ad.1c3765.93d3@mx.google.com> (raw)
In-Reply-To: <20260814063537.GE261864@pevik>
> 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@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-08-20 7:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 15:51 [LTP] [PATCH v3 0/4] test_macros: Add TST_EXP_PASS_OR_FAIL() Petr Vorel
2026-08-11 15:51 ` [LTP] [PATCH v3 1/4] test macros: Fix TST_EXP_FD_OR_FAIL() Petr Vorel
2026-08-11 16:05 ` [LTP] " linuxtestproject.agent
2026-08-12 14:44 ` [LTP] [PATCH v3 1/4] " Cyril Hrubis
2026-08-13 6:40 ` Andrea Cervesato via ltp
2026-08-11 15:52 ` [LTP] [PATCH v3 2/4] test_macros: Add TST_EXP_PASS_OR_FAIL() Petr Vorel
2026-08-12 15:26 ` Cyril Hrubis
2026-08-13 6:41 ` Andrea Cervesato via ltp
2026-08-11 15:52 ` [LTP] [PATCH v3 3/4] tree: Use TST_EXP_PASS_OR_FAIL() and TST_EXP_FD_OR_FAIL() Petr Vorel
2026-08-13 6:40 ` Andrea Cervesato via ltp
2026-08-14 6:24 ` Petr Vorel
2026-08-14 6:35 ` Petr Vorel
2026-08-19 13:53 ` Petr Vorel
2026-08-20 7:52 ` Andrea Cervesato via ltp [this message]
2026-08-11 15:52 ` [LTP] [PATCH v3 4/4] test_macros*.c: Simplify with macros macros Petr Vorel
2026-08-20 7:51 ` Andrea Cervesato via ltp
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=6a86b238.80d8f3ad.1c3765.93d3@mx.google.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox