From: Richard Palethorpe <rpalethorpe@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 3/3] tst_cgroup: make use of alias in safe_cgroup_has
Date: Tue, 22 Jun 2021 14:40:45 +0100 [thread overview]
Message-ID: <87a6ni586a.fsf@suse.de> (raw)
In-Reply-To: <20210622122538.402907-3-liwang@redhat.com>
Hello,
Li Wang <liwang@redhat.com> writes:
> This is to fix the check issue of 'memory.swap.max' on CGroup v1.
>
> Signed-off-by: Li Wang <liwang@redhat.com>
> Cc: Richard Palethorpe <rpalethorpe@suse.com>
> ---
> lib/tst_cgroup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
> index 18e3b6169..61cc02fa7 100644
> --- a/lib/tst_cgroup.c
> +++ b/lib/tst_cgroup.c
> @@ -1010,7 +1010,7 @@ int safe_cgroup_has(const char *const file, const int lineno,
> if (!(alias = cgroup_file_alias(cfile, *dir)))
> continue;
>
> - if (!faccessat((*dir)->dir_fd, file_name, F_OK, 0))
Ah, dumb mistake by me!
> + if (!faccessat((*dir)->dir_fd, alias, F_OK, 0))
> return 1;
>
> if (errno == ENOENT)
Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
--
Thank you,
Richard.
next prev parent reply other threads:[~2021-06-22 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 12:25 [LTP] [PATCH v2 1/3] mem: child alloc memory should larger than memory.max + memory.swap.max if lite==1 Li Wang
2021-06-22 12:25 ` [LTP] [PATCH v2 2/3] oom: enable lite == 1 for memory.swap.max testing Li Wang
2021-06-22 14:23 ` Richard Palethorpe
2021-06-22 12:25 ` [LTP] [PATCH v2 3/3] tst_cgroup: make use of alias in safe_cgroup_has Li Wang
2021-06-22 13:40 ` Richard Palethorpe [this message]
2021-06-22 14:17 ` [LTP] [PATCH v2 1/3] mem: child alloc memory should larger than memory.max + memory.swap.max if lite==1 Richard Palethorpe
2021-06-23 2:10 ` Li Wang
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=87a6ni586a.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=ltp@lists.linux.it \
/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