[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: 781e878eaf90db46239bef8c1fbd1df83aa61b18 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=781e878eaf90db46239bef8c1fbd1df83aa61b18 Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: 9690f414f6ece7346c8a3b4ce8e16ea979646732 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=9690f414f6ece7346c8a3b4ce8e16ea979646732 Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: 3723bc22c09c7c9f9db0106f7c7799314944c7a7 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=3723bc22c09c7c9f9db0106f7c7799314944c7a7 Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: ea6b80e396d1f0f2a82e655917e3ad1641f55e54 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ea6b80e396d1f0f2a82e655917e3ad1641f55e54 Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: 86e72a1439fea10867f8932044ed1e8e4910a3f6 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=86e72a1439fea10867f8932044ed1e8e4910a3f6 Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: 7253f2d7bdba3c014aa026106350d2578f7d032f URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=7253f2d7bdba3c014aa026106350d2578f7d032f Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: 01bc9055b379db95d59cae7f092522a1836abba9 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=01bc9055b379db95d59cae7f092522a1836abba9 Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: 518c9a64b96a59fb8c36c021a2b34c2844f401cd URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=518c9a64b96a59fb8c36c021a2b34c2844f401cd Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: 2d5c0668dd56c9e8dd9c90d471f96192111b1f1b URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=2d5c0668dd56c9e8dd9c90d471f96192111b1f1b Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: 899ffe95305ca61a7354d6fb70addf2cd24d54f6 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=899ffe95305ca61a7354d6fb70addf2cd24d54f6 Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: a29a64172a574320fe24f4a981eb343bc139fb93 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a29a64172a574320fe24f4a981eb343bc139fb93 Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: 27a5142c28df4f469fbc0807afecc9d4a5010bf6 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=27a5142c28df4f469fbc0807afecc9d4a5010bf6 Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-3 Branch: next Commit: cdf93ceb0ff21ee84c35898ea4e1297070d501c4 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=cdf93ceb0ff21ee84c35898ea4e1297070d501c4 Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case by destroying barriers correctly
Module: xenomai-jki Branch: for-forge Commit: cff48824a8c02a945e2e88a7bded9285e4ff854f URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=cff48824a8c02a945e2e88a7bded9285e4ff854f Author: Jan Kiszka Date: Tue Dec 6 16:34:48 2016 +0100 smokey/posix-mutex: Fix test case by destroying barriers correctly At least on x86-64-compat, the missing destruction of the smokey barriers, specifically their embedded mutexes, cause crashes of the test. The reason is likely a mismatch between the kernel's and userland's view on which object is still active, combined with the fact that userland kept them on the volatile stack. Signed-off-by: Jan Kiszka --- testsuite/smokey/posix-mutex/posix-mutex.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c index 151c2f3..9a1592b 100644 --- a/testsuite/smokey/posix-mutex/posix-mutex.c +++ b/testsuite/smokey/posix-mutex/posix-mutex.c @@ -291,6 +291,8 @@ static int do_contend(pthread_mutex_t *mutex, int type) if (!__Tassert(status == NULL)) return -EINVAL; + smokey_barrier_destroy(&barrier); + return 0; } @@ -471,6 +473,8 @@ static int do_pi_contend(int prio) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } @@ -578,6 +582,8 @@ static int do_steal(int may_steal) if (!__T(ret, pthread_mutex_destroy(&mutex))) return ret; + smokey_barrier_destroy(&barrier); + return 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git