[LTP] [PATCH v7] clone3: Add clone3's clone_args cgroup
Petr Vorel
pvorel@suse.cz
Thu Apr 4 22:42:58 CEST 2024
> Signed-off-by: Wei Gao <wegao@suse.com>
> ---
> include/lapi/sched.h | 8 ++
> include/tst_cgroup.h | 4 +
> include/tst_clone.h | 1 +
> lib/tst_cgroup.c | 8 ++
> lib/tst_clone.c | 1 +
> runtest/syscalls | 1 +
> testcases/kernel/syscalls/clone3/.gitignore | 1 +
> testcases/kernel/syscalls/clone3/clone303.c | 95 +++++++++++++++++++++
Note lib changes should have been separated from adding new test clone303.c
(commit would be readable).
> 8 files changed, 119 insertions(+)
> create mode 100644 testcases/kernel/syscalls/clone3/clone303.c
> diff --git a/include/lapi/sched.h b/include/lapi/sched.h
> index 1065665d1..ac766efc5 100644
> --- a/include/lapi/sched.h
> +++ b/include/lapi/sched.h
> @@ -13,6 +13,7 @@
> #include <inttypes.h>
> #include "config.h"
> #include "lapi/syscalls.h"
> +#include "lapi/sched.h"
> struct sched_attr {
> uint32_t size;
> @@ -54,6 +55,9 @@ struct clone_args {
> uint64_t __attribute__((aligned(8))) stack;
> uint64_t __attribute__((aligned(8))) stack_size;
> uint64_t __attribute__((aligned(8))) tls;
> + uint64_t __attribute__((aligned(8))) set_tid;
> + uint64_t __attribute__((aligned(8))) set_tid_size;
> + uint64_t __attribute__((aligned(8))) cgroup;
Adding new members introduced warnings like this:
tst_ns_exec.c: In function ‘main’:
tst_ns_exec.c:70:16: warning: missing initializer for field ‘cgroup’ of ‘struct tst_clone_args’ [-Wmissing-field-initializers]
70 | struct tst_clone_args args = { 0, SIGCHLD };
| ^~~~~~~~~~~~~~
In file included from ../../include/tst_test.h:113,
from tst_ns_exec.c:20:
../../include/tst_clone.h:14:18: note: ‘cgroup’ declared here
14 | uint64_t cgroup;
| ^~~~~~
I'm going to fix it.
Kind regards,
Petr
More information about the ltp
mailing list