All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: Richard Palethorpe <rpalethorpe@suse.com>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 3/3] memcontrol04: Copy from kselftest
Date: Wed, 9 Feb 2022 18:47:46 +0800	[thread overview]
Message-ID: <CAEemH2cb65kihwnkMMKSr8FRXJ_SY3jPnSxPPp-Kk_xBrJAeZw@mail.gmail.com> (raw)
In-Reply-To: <20220208140322.6842-4-rpalethorpe@suse.com>


[-- Attachment #1.1: Type: text/plain, Size: 2472 bytes --]

On Tue, Feb 8, 2022 at 10:04 PM Richard Palethorpe via ltp <
ltp@lists.linux.it> wrote:

> At first glance this test looks the same as memcontrol03. However
> there are some significant changes which complicate combining the two.
>
> Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
>  runtest/controllers                           |   1 +
>  testcases/kernel/controllers/memcg/.gitignore |   1 +
>  .../kernel/controllers/memcg/memcontrol04.c   | 228 ++++++++++++++++++
>  3 files changed, 230 insertions(+)
>  create mode 100644 testcases/kernel/controllers/memcg/memcontrol04.c
>
> diff --git a/runtest/controllers b/runtest/controllers
> index 4a6f919af..3108a2561 100644
> --- a/runtest/controllers
> +++ b/runtest/controllers
> @@ -20,6 +20,7 @@ memcg_control         memcg_control_test.sh
>  memcontrol01 memcontrol01
>  memcontrol02 memcontrol02
>  memcontrol03 memcontrol03
> +memcontrol04 memcontrol04
>
>  cgroup_fj_function_debug cgroup_fj_function.sh debug
>  cgroup_fj_function_cpuset cgroup_fj_function.sh cpuset
> diff --git a/testcases/kernel/controllers/memcg/.gitignore
> b/testcases/kernel/controllers/memcg/.gitignore
> index 49df1582c..3883cede6 100644
> --- a/testcases/kernel/controllers/memcg/.gitignore
> +++ b/testcases/kernel/controllers/memcg/.gitignore
> @@ -8,3 +8,4 @@
>  memcontrol01
>  memcontrol02
>  memcontrol03
> +memcontrol04
> diff --git a/testcases/kernel/controllers/memcg/memcontrol04.c
> b/testcases/kernel/controllers/memcg/memcontrol04.c
> new file mode 100644
> index 000000000..cdfeff4a4
> --- /dev/null
> +++ b/testcases/kernel/controllers/memcg/memcontrol04.c
> @@ -0,0 +1,228 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*\
> + *
> + * [Description]
> + *
> + * Conversion of the forth kself test in cgroup/test_memcontrol.c.
> + *
> + * Original description:
> + * "First, this test creates the following hierarchy:
> + * A       memory.low = 50M,  memory.max = 200M
> + * A/B     memory.low = 50M,  memory.current = 50M
> + * A/B/C   memory.low = 75M,  memory.current = 50M
> + * A/B/D   memory.low = 25M,  memory.current = 50M
> + * A/B/E   memory.low = 500M, memory.current = 0
> + * A/B/F   memory.low = 0,    memory.current = 50M
>

This test has a high repetition with memcontrol03, I'm just
wondering if any possibility to merge together by defining a
struct tcase?

static struct tcase {
       char *ctrl_file;
} tcases[] = {
       {"memory.min"},
       {"memory.low"}
};

-- 
Regards,
Li Wang

[-- Attachment #1.2: Type: text/html, Size: 3711 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]


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

  reply	other threads:[~2022-02-09 10:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 14:03 [LTP] [PATCH 0/3] memcontrol04 and s/cgroup/cg/ Richard Palethorpe via ltp
2022-02-08 14:03 ` [LTP] [PATCH 1/3] API/cgroup: Add memory.{events, low} Richard Palethorpe via ltp
2022-02-16 15:27   ` Cyril Hrubis
2022-02-17  3:14   ` Li Wang
2022-02-08 14:03 ` [LTP] [PATCH 2/3] API/cgroup: Shorten cgroup to cg in most symbols Richard Palethorpe via ltp
2022-02-09  4:51   ` Li Wang
2022-02-10  7:32     ` Richard Palethorpe
2022-02-16 15:26     ` Cyril Hrubis
2022-02-17  3:13       ` Li Wang
2022-02-17  5:37         ` Richard Palethorpe
2022-02-08 14:03 ` [LTP] [PATCH 3/3] memcontrol04: Copy from kselftest Richard Palethorpe via ltp
2022-02-09 10:47   ` Li Wang [this message]
2022-02-10  7:34     ` Richard Palethorpe
2022-02-09 11:05   ` Li Wang
2022-02-10  6:23     ` Li Wang
2022-02-10  7:12       ` Li Wang
2022-02-14  5:40         ` Richard Palethorpe
2022-02-16 10:13           ` Li Wang
2022-02-17  4:35             ` 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=CAEemH2cb65kihwnkMMKSr8FRXJ_SY3jPnSxPPp-Kk_xBrJAeZw@mail.gmail.com \
    --to=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    --cc=rpalethorpe@suse.com \
    /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.