public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] memcg_process: cleanup the SHM segment
Date: Thu, 8 Sep 2016 12:39:43 +0300	[thread overview]
Message-ID: <57D131DF.3000307@oracle.com> (raw)
In-Reply-To: <20160906160126.GA21090@rei.lan>

Hi

On 09/06/2016 07:01 PM, Cyril Hrubis wrote:
> Hi!
>> Let's mark the segment for removal right after we attach it.
>> This way memcg* test cases will no longer leave unused
>> segments after they finish.
>>
>> Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
>> ---
>>  .../controllers/memcg/functional/memcg_process.c   |    9 ++++-----
>>  1 files changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/testcases/kernel/controllers/memcg/functional/memcg_process.c b/testcases/kernel/controllers/memcg/functional/memcg_process.c
>> index fbb76e2..e2c60de 100644
>> --- a/testcases/kernel/controllers/memcg/functional/memcg_process.c
>> +++ b/testcases/kernel/controllers/memcg/functional/memcg_process.c
>> @@ -234,9 +234,6 @@ static void shm(void)
>>  		if (key == -1)
>>  			err(1, "ftok() failed");
>>  
>> -		shmid = shmget(key, memsize, flag);
>> -		if (shmid == -1)
>> -			err(1, "shmget() failed");
>>  		shmctl(shmid, IPC_RMID, NULL);
>                      ^
> Shouldn't we remove this IPC_RMID as well?
> 

Agreed. It's better to remove it.

> 
> Otherwise it looks fine.
> 

Pushed with the removal of the above IPC_RMID call.

Thank you.

      reply	other threads:[~2016-09-08  9:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 12:24 [LTP] [PATCH] memcg_process: cleanup the SHM segment Stanislav Kholmanskikh
2016-09-06 16:01 ` Cyril Hrubis
2016-09-08  9:39   ` Stanislav Kholmanskikh [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=57D131DF.3000307@oracle.com \
    --to=stanislav.kholmanskikh@oracle.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