[LTP] [PATCH 1/1] cgroup: Rewrite some C parts into new API
Petr Vorel
pvorel@suse.cz
Fri Jan 4 14:55:08 CET 2019
Hi,
> diff --git a/testcases/kernel/controllers/cgroup/cgroup_regression_6_2.c b/testcases/kernel/controllers/cgroup/cgroup_regression_6_2.c
...
> -int main(int argc, char **argv)
> +static void do_test(void)
> {
> int usec;
> -
> - if (argc == 2)
> - usec = atoi(argv[1]);
> - else
> + if (tst_parse_int(str_usec, &usec, 1, INT_MAX))
> usec = DEFAULT_USEC;
> while (1) {
> @@ -32,5 +33,15 @@ int main(int argc, char **argv)
> ltp_clone_quick(CLONE_NEWNS, foo, NULL);
> }
> - tst_exit();
> + tst_res(TINFO, "exit");
tst_res(TPASS, "exit");
> }
> +
> +static struct tst_option options[] = {
> + {"u", &str_usec, "-u usec (default " STR(DEFAULT_USEC) ")"},
{"u:", &str_usec, "-u usec (default " STR(DEFAULT_USEC) ")"},
> + {NULL, NULL, NULL}
> +};
But also have problem to kill it => this patch is not applicable.
Kind regards,
Petr
More information about the ltp
mailing list