[LTP] [PATCH 5/6] tools: Implement tst_cgctl binary utility

Li Wang liwang@redhat.com
Tue Jan 11 13:42:54 CET 2022


Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com> wrote:

>  tools/cgroup/Makefile    |  7 ++++
>  tools/cgroup/tst_cgctl.c | 69 ++++++++++++++++++++++++++++++++++++++++

Looks like putting this tst_cgctl.c in testcase/lib/ will be better,
we have no necessary to create it under a bit far directory, and
that tool/ is more generic for LTP, but this process is only for
shell tests.

> +static int cgctl_cleanup(const char *config)
> +{
> +    tst_cgroup_scan();
> +    tst_cgroup_load_config(config);

This tst_cgroup_load_config() does not work as expected.
>From my manual check, the ltp and drain dir have been created
but it prints " Created_Ltp_Dir=no Created_Drain_Dir=no" strings.

...
Detected Roots:
/sys/fs/cgroup/memory Mounted_Root=no Created_Ltp_Dir=no
Created_Drain_Dir=no Test_Id=test-1801
...


> +    tst_cgroup_cleanup();

This does not work as expected too, but the problem should exist
in previous patches. Anyway, I will look into the details tomorrow.

# ./tst_cgctl cleanup "$_cgroup_state"
tst_cgroup.c:414: TBROK: Could not find root from config. Roots
changing between calls?


> +
> +    return 0;
> +}


--
Regards,
Li Wang



More information about the ltp mailing list