From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Peng Haitao <penght@cn.fujitsu.com>
Cc: LTP List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH v3 2/2] shmem_2nstest: fix a bug of hang
Date: Tue, 21 Feb 2012 13:50:46 +0800 [thread overview]
Message-ID: <4F4330B6.4080102@cn.fujitsu.com> (raw)
In-Reply-To: <4F432EF6.40601@cn.fujitsu.com>
On 02/21/2012 01:43 PM, Peng Haitao wrote:
>
> commit d2e9f84 replace fprintf() with snprintf() in tst_print(), but this will
> cause container_test.sh hang in case shmem_2nstest.
>
> If compile tst_res.c without -O[level], the case will not hang.
>
> When I test the following cases:
> # ./shmem_2nstest none
> shmem_2nstest 0 TINFO : Shared Memory namespace test : none
> shmem_2nstest 0 TINFO : Cont1: Able to create shared mem segment
> shmem_2nstest 1 TPASS : Plain cloned process able to access shmem segment created
> # ./shmem_2nstest unshare
> shmem_2nstest 0 TINFO : Shared Memory namespace test : unshare
> shmem_2nstest 0 TINFO : Cont1: Able to create shared mem segment
> shmem_2nstest 0 TINFO : Cont2: Able to allocate shmem seg with the same key
> shmem_2nstest 1 TPASS : unshare : In namespace2 unable to access the shmem seg created in Namespace1
> # ./shmem_2nstest clone
> shmem_2nstest 0 TINFO : Shared Memory namespace test : clone
>
> this will hang up.
>
> So I think tst_resm("Cont1") will cause hang.
Tested OK to me.
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
>
> Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
> ---
> .../kernel/containers/sysvipc/shmem_2nstest.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/testcases/kernel/containers/sysvipc/shmem_2nstest.c b/testcases/kernel/containers/sysvipc/shmem_2nstest.c
> index 7a468ad..28e91ff 100644
> --- a/testcases/kernel/containers/sysvipc/shmem_2nstest.c
> +++ b/testcases/kernel/containers/sysvipc/shmem_2nstest.c
> @@ -69,8 +69,8 @@ int check_shmem1(void *vtest)
> if (id1 == -1)
> tst_brkm(TFAIL|TERRNO, NULL, "shmget failed");
>
> - tst_resm(TINFO, "Cont1: Able to create shared mem segment");
> write(p1[1], "done", 5);
> + tst_resm(TINFO, "Cont1: Able to create shared mem segment");
> tst_exit();
> }
>
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2012-02-21 6:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 5:43 [LTP] [PATCH v3 2/2] shmem_2nstest: fix a bug of hang Peng Haitao
2012-02-21 5:50 ` Wanlong Gao [this message]
2012-02-23 14:17 ` Cyril Hrubis
2012-02-23 14:59 ` Cyril Hrubis
2012-02-23 16:51 ` Cyril Hrubis
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=4F4330B6.4080102@cn.fujitsu.com \
--to=gaowanlong@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=penght@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox