All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>
To: Li Wang <liwang@redhat.com>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 5/6] tools: Implement tst_cgctl binary utility
Date: Wed, 12 Jan 2022 01:46:05 -0800	[thread overview]
Message-ID: <CADS1e3f0UMMOyovAGovGp33hQ6ovt1W6h0-RUSVkQRsHWpy=DA@mail.gmail.com> (raw)
In-Reply-To: <CAEemH2dHHNz25Vacu3r49MHgyd+Urk3c=NHMwA6zV=FFAQSpQw@mail.gmail.com>


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

Hi Li,

On Tue, Jan 11, 2022 at 4:43 AM Li Wang <liwang@redhat.com> wrote:

> Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com> wrote:
>
> >  tools/cgroup/Makefile    |  7 ++++
> >  tools/cgroup/tst_cgctl.c | 69 ++++++++++++++++++++++++++++++++++++++++
>
> Looks like putting this tst_cgctl.c in testcase/lib/ will be better,
> we have no necessary to create it under a bit far directory, and
> that tool/ is more generic for LTP, but this process is only for
> shell tests.
>
>
Yeah I will move it over here. I was not sure exactly where it should go.

> +static int cgctl_cleanup(const char *config)
> > +{
> > +    tst_cgroup_scan();
> > +    tst_cgroup_load_config(config);
>
> This tst_cgroup_load_config() does not work as expected.
> From my manual check, the ltp and drain dir have been created
> but it prints " Created_Ltp_Dir=no Created_Drain_Dir=no" strings.
>
> ...
> Detected Roots:
> /sys/fs/cgroup/memory Mounted_Root=no Created_Ltp_Dir=no
> Created_Drain_Dir=no Test_Id=test-1801
> ...
>
>
>
Hm, I'm not sure what this could be. Are you sure when you were reading the
printed info it was in the same invocation as when it was being created?
Because the tst_cgroup_print_config is just pretty directly printing out
the state of the cgroup framework.

> +    tst_cgroup_cleanup();
>
> This does not work as expected too, but the problem should exist
> in previous patches. Anyway, I will look into the details tomorrow.
>
> # ./tst_cgctl cleanup "$_cgroup_state"
> tst_cgroup.c:414: TBROK: Could not find root from config. Roots
> changing between calls?
>
>
Was "/sys/fs/cgroup/cpu,cpuacct" one of the roots that was printed out?
Because if so the way I have it now it would not be able to parse that. I
will look into fixing this.


> > +
> > +    return 0;
> > +}
>
>
> --
> Regards,
> Li Wang
>
>
Thanks again for review,

- Luke

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

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


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

  reply	other threads:[~2022-01-12  9:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 10:00 [LTP] [PATCH 0/6] Expand Cgroup shell library Luke Nowakowski-Krijger
2022-01-05 10:00 ` [LTP] [PATCH 1/6] API/cgroup: Modify tst_cgroup_print_config for easier parsing and consumption Luke Nowakowski-Krijger
2022-01-05 10:00 ` [LTP] [PATCH 2/6] API/cgroup: Add cgroup_find_root helper function Luke Nowakowski-Krijger
2022-01-12 10:46   ` Li Wang
2022-01-05 10:00 ` [LTP] [PATCH 3/6] API/cgroup: Add option for specific pid to tst_cgroup_opts Luke Nowakowski-Krijger
2022-01-05 10:00 ` [LTP] [PATCH 4/6] API/cgroup: Implement tst_cgroup_load_config() Luke Nowakowski-Krijger
2022-01-14  6:57   ` Li Wang
2022-01-14  9:32     ` Luke Nowakowski-Krijger
2022-01-05 10:00 ` [LTP] [PATCH 5/6] tools: Implement tst_cgctl binary utility Luke Nowakowski-Krijger
2022-01-11 12:42   ` Li Wang
2022-01-12  9:46     ` Luke Nowakowski-Krijger [this message]
2022-01-12 10:13       ` Li Wang
2022-01-05 10:00 ` [LTP] [PATCH 6/6] controllers: Expand cgroup_lib shell library Luke Nowakowski-Krijger
2022-01-11  9:38   ` Li Wang
2022-01-11 10:10     ` Li Wang
2022-01-11 10:50   ` Li Wang
2022-01-11 12:17     ` Luke Nowakowski-Krijger

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='CADS1e3f0UMMOyovAGovGp33hQ6ovt1W6h0-RUSVkQRsHWpy=DA@mail.gmail.com' \
    --to=luke.nowakowskikrijger@canonical.com \
    --cc=liwang@redhat.com \
    --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.