From: Cristian Marussi <cristian.marussi@arm.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 4/4] cgroup: helpers various fixes
Date: Fri, 21 Dec 2018 15:29:39 +0000 [thread overview]
Message-ID: <ea29001c-59a8-21b8-867b-5dd9fbfbfd2a@arm.com> (raw)
In-Reply-To: <20181221140118.GA22257@dell5510>
Hi
On 21/12/2018 14:01, Petr Vorel wrote:
> Hi Cristian,
>
>> diff --git a/testcases/kernel/controllers/cgroup/cgroup_regress_test_6_2.c b/testcases/kernel/controllers/cgroup/cgroup_regress_test_6_2.c
>> new file mode 100644
> When you add new file, you need to put it also into .gitignore.
> + Remove /test_6_2 from it (original file).
>
Didn't know. I'll do that.
> ...
>> +++ b/testcases/kernel/controllers/cgroup/cgroup_regress_test_6_2.c
>> @@ -0,0 +1,37 @@
>> +// SPDX-License-Identifier: GPL-2.0-or-later
>> +/*
>> + * Copyright (c) 2009 FUJITSU LIMITED
>> + *
>> + * Author: Li Zefan <lizf@cn.fujitsu.com>
>> + */
>> +
>> +#define _GNU_SOURCE
> Is _GNU_SOURCE really needed?
>
I'll have a better look.
>> +#include <sched.h>
>> +#include <stdlib.h>
>> +#include <unistd.h>
>> +#include "test.h"
> Please don't use legacy API.
>
Ok.
>> +
>> +#define DEFAULT_USEC 30000
>> +
>> +int foo(void __attribute__ ((unused)) * arg)
>> +{
>> + return 0;
>> +}
>> +
>> +int main(int argc, char **argv)
>> +{
>> + int usec;
>> +
>> + if (argc == 2)
>> + usec = atoi(argv[1]);
>> + else
>> + usec = DEFAULT_USEC;
>> +
>> + while (1) {
>> + usleep(usec);
>> + ltp_clone_quick(CLONE_NEWNS, foo, NULL);
>> + }
>> +
>> + tst_exit();
>> +}
>
> ...
>
>> +++ b/testcases/kernel/controllers/cgroup/getdelays.c
>> @@ -1,3 +1,4 @@
>> +// SPDX-License-Identifier: GPL-2.0-or-later
>> /* getdelays.c
>
> There is build warning, can you please fix it:
>
> getdelays.c: In function ‘get_family_id’:
> getdelays.c:177:14: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
> int id = 0, rc;
> ^~
> getdelays.c: In function ‘main’:
> getdelays.c:418:7: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
> int i;
> ^
>
Fine.
> Kind regards,
> Petr
>
Regards
Cristian
next prev parent reply other threads:[~2018-12-21 15:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-20 18:21 [LTP] [PATCH v2 0/4] cgroup tests newlib-porting Cristian Marussi
2018-12-20 18:21 ` [LTP] [PATCH v2 1/4] cgroup_regression_test.sh ported to newlib Cristian Marussi
2018-12-21 14:25 ` Petr Vorel
2018-12-21 15:20 ` Cristian Marussi
2018-12-21 18:23 ` Cristian Marussi
2018-12-21 14:35 ` Petr Vorel
2018-12-21 15:27 ` Cristian Marussi
2018-12-20 18:21 ` [LTP] [PATCH v2 2/4] cgroup_regression_test.sh cleanup Cristian Marussi
2018-12-20 18:21 ` [LTP] [PATCH v2 3/4] cgroup_regression_test.sh: added helper Cristian Marussi
2018-12-20 18:21 ` [LTP] [PATCH v2 4/4] cgroup: helpers various fixes Cristian Marussi
2018-12-21 14:01 ` Petr Vorel
2018-12-21 15:29 ` Cristian Marussi [this message]
2018-12-21 18:23 ` Cristian Marussi
2018-12-21 13:39 ` [LTP] [PATCH v2 0/4] cgroup tests newlib-porting Petr Vorel
2018-12-21 15:36 ` Cristian Marussi
2018-12-21 15:47 ` Petr Vorel
2018-12-21 18:23 ` Cristian Marussi
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=ea29001c-59a8-21b8-867b-5dd9fbfbfd2a@arm.com \
--to=cristian.marussi@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox