<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Merged, thanks!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 29, 2022 at 9:28 AM Yang Xu <<a href="mailto:xuyang2018.jy@fujitsu.com">xuyang2018.jy@fujitsu.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This fix undefined CLONE_NEWCGROUP problem on centos7.<br>
<br>
Fixes: 5f2a365da ("cgroup_core02: copy from kernel selftest test_cgcore_lesser_ns_open")<br>
Signed-off-by: Yang Xu <<a href="mailto:xuyang2018.jy@fujitsu.com" target="_blank">xuyang2018.jy@fujitsu.com</a>><br>
---<br>
I have verified it on my ltp fork[1]<br>
[1]<a href="https://github.com/xuyang0410/ltp/actions/runs/3570059301/jobs/6000664209" rel="noreferrer" target="_blank">https://github.com/xuyang0410/ltp/actions/runs/3570059301/jobs/6000664209</a><br>
include/lapi/namespaces_constants.h | 3 +++<br>
testcases/kernel/controllers/cgroup/cgroup_core02.c | 1 +<br>
2 files changed, 4 insertions(+)<br>
<br>
diff --git a/include/lapi/namespaces_constants.h b/include/lapi/namespaces_constants.h<br>
index 447f16c5b..e34b0d6a8 100644<br>
--- a/include/lapi/namespaces_constants.h<br>
+++ b/include/lapi/namespaces_constants.h<br>
@@ -21,6 +21,9 @@<br>
#ifndef CLONE_NEWUSER<br>
# define CLONE_NEWUSER 0x10000000<br>
#endif<br>
+#ifndef CLONE_NEWCGROUP<br>
+# define CLONE_NEWCGROUP 0x02000000<br>
+#endif<br>
#ifndef CLONE_NEWUTS<br>
# define CLONE_NEWUTS 0x04000000<br>
#endif<br>
diff --git a/testcases/kernel/controllers/cgroup/cgroup_core02.c b/testcases/kernel/controllers/cgroup/cgroup_core02.c<br>
index 0dff71eea..e6d599b36 100644<br>
--- a/testcases/kernel/controllers/cgroup/cgroup_core02.c<br>
+++ b/testcases/kernel/controllers/cgroup/cgroup_core02.c<br>
@@ -31,6 +31,7 @@<br>
#include <pwd.h><br>
#include "tst_test.h"<br>
#include "tst_safe_file_at.h"<br>
+#include "lapi/namespaces_constants.h"<br>
<br>
static struct tst_cg_group *cg_child_a, *cg_child_b;<br>
static uid_t nobody_uid;<br>
-- <br>
2.23.0<br>
<br>
<br>
-- <br>
Mailing list info: <a href="https://lists.linux.it/listinfo/ltp" rel="noreferrer" target="_blank">https://lists.linux.it/listinfo/ltp</a><br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>