* [LTP] [PATCH]pthread_join:4-1.c:ignore detached thread
@ 2012-03-29 1:40 lidan
2012-03-29 9:59 ` Wanlong Gao
2012-03-30 6:50 ` Wanlong Gao
0 siblings, 2 replies; 3+ messages in thread
From: lidan @ 2012-03-29 1:40 UTC (permalink / raw)
To: ltp-list
Case pthread_join/4-1.c aims to check the following assertion
"If the thread calling pthread_join is canceled, the joined
thread remains joinable."
It uses array scenarii defined in "threads_scenarii.c" which
sets attribute of some threads as detached.
This patch ignores the detached threads since once
a thread has been detached, it can't be joined with
pthread_join(3) or be made joinable again.
Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>
---
.../conformance/interfaces/pthread_join/4-1.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
index fb8c8d3..16ac7e8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
@@ -91,6 +91,9 @@ int main(int argc, char *argv[])
scenar_init();
for (sc = 0; sc < NSCENAR; sc++) {
+ if (scenarii[sc].detached == 1)
+ continue;
+
#if VERBOSE > 0
output("-----\n");
output("Starting test with scenario (%i): %s\n",
--
1.7.7.2
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH]pthread_join:4-1.c:ignore detached thread
2012-03-29 1:40 [LTP] [PATCH]pthread_join:4-1.c:ignore detached thread lidan
@ 2012-03-29 9:59 ` Wanlong Gao
2012-03-30 6:50 ` Wanlong Gao
1 sibling, 0 replies; 3+ messages in thread
From: Wanlong Gao @ 2012-03-29 9:59 UTC (permalink / raw)
To: lidan; +Cc: ltp-list
On 03/29/2012 09:40 AM, lidan wrote:
> Case pthread_join/4-1.c aims to check the following assertion
> "If the thread calling pthread_join is canceled, the joined
> thread remains joinable."
> It uses array scenarii defined in "threads_scenarii.c" which
> sets attribute of some threads as detached.
> This patch ignores the detached threads since once
> a thread has been detached, it can't be joined with
> pthread_join(3) or be made joinable again.
Looks good to me, any other comments?
Thanks,
Wanlong Gao
>
>
> Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>
> ---
> .../conformance/interfaces/pthread_join/4-1.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
> index fb8c8d3..16ac7e8 100644
> --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
> @@ -91,6 +91,9 @@ int main(int argc, char *argv[])
> scenar_init();
>
> for (sc = 0; sc < NSCENAR; sc++) {
> + if (scenarii[sc].detached == 1)
> + continue;
> +
> #if VERBOSE > 0
> output("-----\n");
> output("Starting test with scenario (%i): %s\n",
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH]pthread_join:4-1.c:ignore detached thread
2012-03-29 1:40 [LTP] [PATCH]pthread_join:4-1.c:ignore detached thread lidan
2012-03-29 9:59 ` Wanlong Gao
@ 2012-03-30 6:50 ` Wanlong Gao
1 sibling, 0 replies; 3+ messages in thread
From: Wanlong Gao @ 2012-03-30 6:50 UTC (permalink / raw)
To: lidan; +Cc: ltp-list
On 03/29/2012 09:40 AM, lidan wrote:
> Case pthread_join/4-1.c aims to check the following assertion
> "If the thread calling pthread_join is canceled, the joined
> thread remains joinable."
> It uses array scenarii defined in "threads_scenarii.c" which
> sets attribute of some threads as detached.
> This patch ignores the detached threads since once
> a thread has been detached, it can't be joined with
> pthread_join(3) or be made joinable again.
pushed, thanks,
Wanlong Gao
>
>
> Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>
> ---
> .../conformance/interfaces/pthread_join/4-1.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
> index fb8c8d3..16ac7e8 100644
> --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
> @@ -91,6 +91,9 @@ int main(int argc, char *argv[])
> scenar_init();
>
> for (sc = 0; sc < NSCENAR; sc++) {
> + if (scenarii[sc].detached == 1)
> + continue;
> +
> #if VERBOSE > 0
> output("-----\n");
> output("Starting test with scenario (%i): %s\n",
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-30 6:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-29 1:40 [LTP] [PATCH]pthread_join:4-1.c:ignore detached thread lidan
2012-03-29 9:59 ` Wanlong Gao
2012-03-30 6:50 ` Wanlong Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox