public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 4/4] scripts/coccinelle: Helper for converting CGroup selftests
Date: Tue, 14 Dec 2021 11:22:30 +0000	[thread overview]
Message-ID: <87czlza0n9.fsf@suse.de> (raw)
In-Reply-To: <Ybh8vUPDA8a0oBOC@yuki>

Hello,

Cyril Hrubis <chrubis@suse.cz> writes:

> Hi!
>> +@@
>> +expression cg;
>> +@@
>> +
>> +... when != TST_CGROUP_VER(...)
>> +
>> +- SAFE_CGROUP_PRINT(cg, "cgroup.subtree_control", "+memory");
>> ++ if (TST_CGROUP_VER(cg, "memory") != TST_CGROUP_V1)
>> ++    SAFE_CGROUP_PRINT(cg, "cgroup.subtree_control", "+memory");
>
> I guess that here we operat on already partially converted code right?

Correct, in general cg_write is converted to safe_cgroup_print. Then we
have this special rule for subtree_control to introduce the version
check (if there isn't one already present).

>
>
> Other than this the rest is really straightforward:
>
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>


-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2021-12-14 11:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14  9:06 [LTP] [PATCH 0/4] Begin converting kselftest memcg tests Richard Palethorpe via ltp
2021-12-14  9:06 ` [LTP] [PATCH 1/4] API: cgroup: Add safe_cgroup_occursin Richard Palethorpe via ltp
2021-12-14 10:40   ` Cyril Hrubis
2021-12-14  9:06 ` [LTP] [PATCH 2/4] API: cgroup: Add cgroup.controllers Richard Palethorpe via ltp
2021-12-14 10:40   ` Cyril Hrubis
2021-12-14  9:06 ` [LTP] [PATCH 3/4] memcontrol01: Import first memcg kselftest Richard Palethorpe via ltp
2021-12-14 11:10   ` Cyril Hrubis
2021-12-14  9:06 ` [LTP] [PATCH 4/4] scripts/coccinelle: Helper for converting CGroup selftests Richard Palethorpe via ltp
2021-12-14 11:15   ` Cyril Hrubis
2021-12-14 11:22     ` Richard Palethorpe [this message]

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=87czlza0n9.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=chrubis@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox