From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 3/3] tst_cgroup: make use of alias in safe_cgroup_has
Date: Wed, 23 Jun 2021 14:24:56 +0800 [thread overview]
Message-ID: <20210623062456.430406-3-liwang@redhat.com> (raw)
In-Reply-To: <20210623062456.430406-1-liwang@redhat.com>
This is to fix the check issue of 'memory.swap.max' on CGroup v1.
Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
Signed-off-by: Li Wang <liwang@redhat.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))
+ if (!faccessat((*dir)->dir_fd, alias, F_OK, 0))
return 1;
if (errno == ENOENT)
--
2.31.1
next prev parent reply other threads:[~2021-06-23 6:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 6:24 [LTP] [PATCH v3 1/3] mem: child alloc memory should larger than memory.max + memory.swap.max if lite==1 Li Wang
2021-06-23 6:24 ` [LTP] [PATCH v3 2/3] oom: enable lite == 1 for memory.swap.max testing Li Wang
2021-06-23 8:35 ` Petr Vorel
2021-06-23 10:34 ` Richard Palethorpe
2021-06-23 6:24 ` Li Wang [this message]
2021-06-23 7:40 ` [LTP] [PATCH v3 1/3] mem: child alloc memory should larger than memory.max + memory.swap.max if lite==1 Petr Vorel
2021-06-23 10:33 ` Richard Palethorpe
2021-06-23 12:32 ` 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=20210623062456.430406-3-liwang@redhat.com \
--to=liwang@redhat.com \
--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