From: Petr Vorel <pvorel@suse.cz>
To: lufei <lufei@uniontech.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] acct01: add EFAULT errno check
Date: Fri, 21 Jun 2024 14:00:53 +0200 [thread overview]
Message-ID: <20240621120053.GA683401@pevik> (raw)
In-Reply-To: <20240606065506.1686-1-lufei@uniontech.com>
Hi Lu,
> 1. add EFAULT errno check.
> 2. fix make check errors and warnings.
Changes LGTM, but could you please separate these changes into it's own commit?
FYI it's a good habit to separate changes (easier to review, it would not be
clear what is EFAULT related change). We sometimes just mix these changes, but
here both changes are quite big + you even touch a different test.
> ---
...
> testcases/kernel/syscalls/acct/acct01.c | 31 +++++++++++++++++--------
> - TEST(acct(NULL));
> - if (TST_RET == -1 && TST_ERR == ENOSYS)
> - tst_brk(TCONF, "acct() system call isn't configured in kernel");
Good point. This was added in 2013 ba3bf0e34 ("acct01: add a check routine for
acct implementation") and was valid until you added now:
> + .needs_kconfigs = (const char *[]) {
> + "CONFIG_BSD_PROCESS_ACCT=y",
> + },
@Cyril: would you replace ENOSYS with CONFIG_BSD_PROCESS_ACCT=y ?
I would try to avoid using .needs_kconfigs when ENOSYS can be checked.
Kind regards,
Petr
> };
> diff --git a/testcases/kernel/syscalls/acct/acct02.c b/testcases/kernel/syscalls/acct/acct02.c
> index d3f3d9d04..74019f430 100644
> --- a/testcases/kernel/syscalls/acct/acct02.c
> +++ b/testcases/kernel/syscalls/acct/acct02.c
> @@ -186,7 +186,7 @@ static void run(void)
> if (read_bytes != acct_size) {
> tst_res(TFAIL, "incomplete read %i bytes, expected %i",
> - read_bytes, acct_size);
> + read_bytes, acct_size);
> goto exit;
> }
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-06-21 12:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 6:55 [LTP] [PATCH] acct01: add EFAULT errno check lufei
2024-06-21 12:00 ` Petr Vorel [this message]
[not found] ` <20240624015245.54968-1-lufei@uniontech.com>
2024-06-24 1:52 ` lufei
2024-07-08 4:23 ` Petr Vorel
2024-07-08 5:31 ` 路斐
2024-07-08 8:54 ` Petr Vorel
2024-07-29 22:44 ` Petr Vorel
2024-06-24 1:54 ` [LTP] [PATCH] acct: fix make check errors: using .needs_kconfigs lufei
2024-07-04 13:29 ` [LTP] [PATCH] acct01: add EFAULT errno check Cyril Hrubis
2024-07-05 2:02 ` 路斐
2024-07-08 8:56 ` 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=20240621120053.GA683401@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=lufei@uniontech.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