From: Caspar Zhang <caspar@casparzhang.com>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: LTP List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] sched_getaffinity: fix possible fail in negative case
Date: Fri, 09 Mar 2012 13:48:13 +0800 [thread overview]
Message-ID: <4F59999D.2020909@casparzhang.com> (raw)
In-Reply-To: <1331270886-22153-1-git-send-email-caspar@casparzhang.com>
On 03/09/2012 01:28 PM, Caspar Zhang wrote:
>
> in negative case:
>
> QUICK_TEST(sched_getaffinity(getpid()+1, len, mask));
>
> sometimes getpid()+1 will exist if there're other processes running.
> This patch uses a different way to make sure the required pid doesn't
> exist by forking a child and terminating it. The pid of the terminated
> child will not be used for a short time and it's enough for the test to
> continue.
>
> Signed-off-by: Caspar Zhang <caspar@casparzhang.com>
> ---
> .../sched_getaffinity/sched_getaffinity01.c | 18 ++++++++++++++++--
> 1 files changed, 16 insertions(+), 2 deletions(-)
>
Hmmm, I took a look at commit c8319c8 and found that Garrett added a
similar non-exist-pid case already. I guess we can simply remove the one
I tried to fix...
Thanks,
Caspar
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2012-03-09 5:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 5:28 [LTP] [PATCH] sched_getaffinity: fix possible fail in negative case Caspar Zhang
2012-03-09 5:48 ` Caspar Zhang [this message]
2012-03-09 5:53 ` Wanlong Gao
2012-03-09 7:19 ` Garrett Cooper
2012-03-09 8:59 ` Caspar Zhang
2012-05-02 12:27 ` 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=4F59999D.2020909@casparzhang.com \
--to=caspar@casparzhang.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=yanegomi@gmail.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 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.