public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] memcg_process: cleanup the SHM segment
Date: Tue, 6 Sep 2016 18:01:26 +0200	[thread overview]
Message-ID: <20160906160126.GA21090@rei.lan> (raw)
In-Reply-To: <1472819042-25151-1-git-send-email-stanislav.kholmanskikh@oracle.com>

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?


Otherwise it looks fine.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2016-09-06 16:01 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 [this message]
2016-09-08  9:39   ` Stanislav Kholmanskikh

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=20160906160126.GA21090@rei.lan \
    --to=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