* [LTP] [PATCH] tst_cgroup: Fix typo
@ 2022-07-08 10:49 Yang Xu
2022-07-11 5:38 ` Li Wang
0 siblings, 1 reply; 2+ messages in thread
From: Yang Xu @ 2022-07-08 10:49 UTC (permalink / raw)
To: ltp
We only have needs_cgroup_ctrls instead of needs_cgroup_controllers in
tst_test structure. So fix it.
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
I found it when I plan to write a cgroup regression test to ltp.
doc/c-test-api.txt | 6 +++---
include/tst_cgroup.h | 2 +-
lib/tst_test.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/c-test-api.txt b/doc/c-test-api.txt
index c138b7027..9ecf28630 100644
--- a/doc/c-test-api.txt
+++ b/doc/c-test-api.txt
@@ -2144,13 +2144,13 @@ struct tst_test test = {
.setup = setup,
.test_all = run,
.cleanup = cleanup,
- .needs_cgroup_controllers = (const char *const []){ "memory", NULL },
+ .needs_cgroup_ctrls = (const char *const []){ "memory", NULL },
...
};
-------------------------------------------------------------------------------
Above, we first ensure the memory controller is available on the
-test's CGroup with '.needs_cgroup_controllers'. This populates a structure,
+test's CGroup with '.needs_cgroup_ctrls'. This populates a structure,
'tst_cg', which represents the test's CGroup.
We then write the current processes PID into 'cgroup.procs', which
@@ -2217,7 +2217,7 @@ static void cleanup(void)
struct tst_test test = {
.setup = setup,
.test_all = run,
- .needs_cgroup_controllers = (const char *const []){
+ .needs_cgroup_ctrls = (const char *const []){
"cpuset",
"memory",
NULL
diff --git a/include/tst_cgroup.h b/include/tst_cgroup.h
index d32d62399..08d1339a2 100644
--- a/include/tst_cgroup.h
+++ b/include/tst_cgroup.h
@@ -115,7 +115,7 @@ void tst_cg_print_config(void);
/* Ensure the specified controller is available in the test's default
* CGroup, mounting/enabling it if necessary. Usually this is not
- * necesary use tst_test.needs_cgroup_controllers instead.
+ * necessary use tst_test.needs_cgroup_ctrls instead.
*/
void tst_cg_require(const char *const ctrl_name,
const struct tst_cg_opts *const options)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 4a196fc46..4b4dd125d 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1259,7 +1259,7 @@ static void do_setup(int argc, char *argv[])
if (tst_test->needs_cgroup_ctrls)
do_cgroup_requires();
else if (tst_test->needs_cgroup_ver)
- tst_brk(TBROK, "needs_cgroup_ver only works with needs_cgroup_controllers");
+ tst_brk(TBROK, "tst_test->needs_cgroup_ctrls must be set");
}
static void do_test_setup(void)
--
2.27.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] tst_cgroup: Fix typo
2022-07-08 10:49 [LTP] [PATCH] tst_cgroup: Fix typo Yang Xu
@ 2022-07-11 5:38 ` Li Wang
0 siblings, 0 replies; 2+ messages in thread
From: Li Wang @ 2022-07-11 5:38 UTC (permalink / raw)
To: Yang Xu; +Cc: LTP List
[-- Attachment #1.1: Type: text/plain, Size: 39 bytes --]
Pushed, thanks!
--
Regards,
Li Wang
[-- Attachment #1.2: Type: text/html, Size: 313 bytes --]
[-- Attachment #2: Type: text/plain, Size: 60 bytes --]
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-11 5:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08 10:49 [LTP] [PATCH] tst_cgroup: Fix typo Yang Xu
2022-07-11 5:38 ` Li Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.