All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] tst_cgroup: Don't try to use V2 if V1 controllers are mounted
Date: Thu, 24 Sep 2020 13:33:47 +0200	[thread overview]
Message-ID: <20200924113347.GA12565@dell5510> (raw)
In-Reply-To: <20200924111124.5666-1-rpalethorpe@suse.com>

Hi Richie,

> It is not possible to use a controller in V2 cgroups if it has been
> mounted as a V1 controller. So if V1 is mounted we use it regardless
> of if V2 is available.

> We have to include a space in tst_is_mounted so that we do not match
> cgroup2.

Acked-by: Petr Vorel <pvorel@suse.cz>

Thanks for your fix.

> Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
>  lib/tst_cgroup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
> index ba413d874..73ddd4b82 100644
> --- a/lib/tst_cgroup.c
> +++ b/lib/tst_cgroup.c
> @@ -44,7 +44,7 @@ enum tst_cgroup_ver tst_cgroup_version(void)
>          enum tst_cgroup_ver cg_ver;

>          if (tst_cgroup_check("cgroup2")) {
> -                if (!tst_is_mounted("cgroup2") && tst_is_mounted("cgroup"))
> +                if (tst_is_mounted("cgroup "))
On first look the space looks like typo. But people can use git blame.

>                          cg_ver = TST_CGROUP_V1;
>                  else
>                          cg_ver = TST_CGROUP_V2;

Kind regards,
Petr

  reply	other threads:[~2020-09-24 11:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 11:11 [LTP] [PATCH] tst_cgroup: Don't try to use V2 if V1 controllers are mounted Richard Palethorpe
2020-09-24 11:33 ` Petr Vorel [this message]
2020-09-24 12:53 ` Li Wang
2020-09-24 14:05   ` Richard Palethorpe
2020-09-25  2:29     ` Li Wang
2020-09-25  7:39       ` Richard Palethorpe
2020-09-25 12:04         ` Li Wang
2020-09-25 12:26           ` Richard Palethorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200924113347.GA12565@dell5510 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.