[CRIU] [PATCH] zdtm: don't use same cgoup names for a few tests

Pavel Emelyanov xemul at parallels.com
Fri Aug 15 04:43:00 PDT 2014


On 08/15/2014 03:32 PM, Andrey Vagin wrote:
> We run tests concurrently and they can race for equal resources

This is strange, as tests re-use cgroups. But parallel
execution may result in cgroup.hook removing groups
fron under restore.

> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  test/zdtm/live/static/cgroup00.c | 4 ++--
>  test/zdtm/live/static/cgroup01.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/test/zdtm/live/static/cgroup00.c b/test/zdtm/live/static/cgroup00.c
> index 9b8c3df..4757a24 100644
> --- a/test/zdtm/live/static/cgroup00.c
> +++ b/test/zdtm/live/static/cgroup00.c
> @@ -13,8 +13,8 @@ const char *test_author	= "Pavel Emelianov <xemul at parallels.com>";
>  char *dirname;
>  TEST_OPTION(dirname, string, "cgroup directory name", 1);
>  static const char *cgname = "zdtmtst";
> -#define SUBNAME	"subcg"
> -#define SUBNAME2 SUBNAME"/subsubcg"
> +#define SUBNAME	"subcg00"
> +#define SUBNAME2 SUBNAME"/subsubcg00"
>  
>  static int cg_move(char *name)
>  {
> diff --git a/test/zdtm/live/static/cgroup01.c b/test/zdtm/live/static/cgroup01.c
> index a715cd8..128cd49 100644
> --- a/test/zdtm/live/static/cgroup01.c
> +++ b/test/zdtm/live/static/cgroup01.c
> @@ -12,8 +12,8 @@ const char *test_author	= "Tycho Andersen <tycho.andersen at canonical.com>";
>  char *dirname;
>  TEST_OPTION(dirname, string, "cgroup directory name", 1);
>  static const char *cgname = "zdtmtst";
> -static const char *subname = "subcg";
> -static const char *empty = "empty";
> +static const char *subname = "subcg01";
> +static const char *empty = "empty01";
>  
>  int main(int argc, char **argv)
>  {
> 



More information about the CRIU mailing list