[CRIU] [PATCH] zdtm: Remove cgroup hierarhy after test cgroup01 is finished
Pavel Emelyanov
xemul at parallels.com
Mon Nov 23 08:54:58 PST 2015
On 11/23/2015 06:56 PM, Kirill Tkhai wrote:
> Hierarhy remains even after cgroup is umounted, so it's need
> to kill it manually.
The cgroup01.hook is supposed to clean stuff up after test. Does it do it?
> Signed-off-by: Kirill Tkhai <ktkhai at odin.com>
> ---
> test/zdtm/live/static/cgroup01.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/test/zdtm/live/static/cgroup01.c b/test/zdtm/live/static/cgroup01.c
> index 7f964cf..d3c0d87 100644
> --- a/test/zdtm/live/static/cgroup01.c
> +++ b/test/zdtm/live/static/cgroup01.c
> @@ -69,7 +69,7 @@ int main(int argc, char **argv)
> cgf = fopen("/proc/self/mountinfo", "r");
> if (cgf == NULL) {
> fail("No mountinfo file");
> - goto out_rs;
> + goto out_hier;
> }
>
> while (fgets(paux, sizeof(paux), cgf)) {
> @@ -106,6 +106,13 @@ int main(int argc, char **argv)
>
> out_close:
> fclose(cgf);
> +out_hier:
> + for (i = 0; i < 2; i++) {
> + sprintf(paux, "%s/%s/%s.%d", dirname, subname, empty, i);
> + rmdir(paux);
> + }
> + sprintf(paux, "%s/%s", dirname, subname);
> + rmdir(paux);
> out_rs:
> umount(dirname);
> out_rd:
>
> .
>
More information about the CRIU
mailing list