Module: xenomai-3 Branch: next Commit: 781e878eaf90db46239bef8c1fbd1df83aa61b18 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=781e878eaf90db46239bef8c1fbd1df83aa61b18
Author: Jan Kiszka <jan.kis...@siemens.com> 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 <jan.kis...@siemens.com> --- 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