[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case /wrt mutex object reuse

2017-07-27 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: c1adcfd1da9dffcf23054aefc393ed573adee039
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=c1adcfd1da9dffcf23054aefc393ed573adee039

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2017-06-03 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: f627aa5ca450915466f014fa7eb7ff49252af760
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f627aa5ca450915466f014fa7eb7ff49252af760

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2017-05-15 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 42ed671da44bffa77ed585ba3173bdaa89b14954
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=42ed671da44bffa77ed585ba3173bdaa89b14954

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2017-05-13 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: d3ff34ef6a1309f43000322f023e6c4f76585adb
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=d3ff34ef6a1309f43000322f023e6c4f76585adb

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2017-03-15 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 55f69f2af508c41a4f637726f672c0fd90a2b93f
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=55f69f2af508c41a4f637726f672c0fd90a2b93f

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2017-03-13 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: f6394c3e360931b57ae17ec0ba9b0899fff7c142
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f6394c3e360931b57ae17ec0ba9b0899fff7c142

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2017-03-05 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 131d553126f384d1f7255995a4e3153cff15c57a
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=131d553126f384d1f7255995a4e3153cff15c57a

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2017-02-15 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 82fc9c4a3e44f0b84b4112aac86d1bd03e5f44a4
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=82fc9c4a3e44f0b84b4112aac86d1bd03e5f44a4

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2017-01-26 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 9fd3f287a85ee0d18e96aab39e0ab6ba74e0fe58
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=9fd3f287a85ee0d18e96aab39e0ab6ba74e0fe58

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2016-12-09 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 32489b87cdd70db322764390d52dfb0a27f18049
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=32489b87cdd70db322764390d52dfb0a27f18049

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2016-11-28 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: e352f0e098fed14d74ec0926946b811002991dca
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=e352f0e098fed14d74ec0926946b811002991dca

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2016-11-21 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 5a9481f607de2af097353cce0e027a5ab3153162
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=5a9481f607de2af097353cce0e027a5ab3153162

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2016-10-17 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: b98817fa08d32b054b9868627467190d7c469bb5
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b98817fa08d32b054b9868627467190d7c469bb5

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2016-09-22 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 0bc299115b2fa00e951ef4a001b091f7993ed742
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=0bc299115b2fa00e951ef4a001b091f7993ed742

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2016-03-20 Thread git repository hosting
Module: xenomai-3
Branch: wip/setsched-norelax
Commit: d138f8c918cebfefa51acfa41f4d6ae60942a76a
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=d138f8c918cebfefa51acfa41f4d6ae60942a76a

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2016-03-19 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 5393de43e60bab0682f84733174c4fc089a7fd42
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=5393de43e60bab0682f84733174c4fc089a7fd42

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2016-03-19 Thread git repository hosting
Module: xenomai-3
Branch: wip/prioceil
Commit: d138f8c918cebfefa51acfa41f4d6ae60942a76a
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=d138f8c918cebfefa51acfa41f4d6ae60942a76a

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2016-03-02 Thread git repository hosting
Module: xenomai-3
Branch: wip/prioceil
Commit: 8e963986b971d8d8693a7213f9c5c5a7b0cd75a9
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=8e963986b971d8d8693a7213f9c5c5a7b0cd75a9

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
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 /wrt mutex object reuse

2016-02-27 Thread git repository hosting
Module: xenomai-3
Branch: wip/prioceil
Commit: b34764448c05aa9de832114bfa0baa77b1f5c619
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b34764448c05aa9de832114bfa0baa77b1f5c619

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
return 0;
 }
 


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case /wrt mutex object reuse

2016-02-26 Thread git repository hosting
Module: xenomai-3
Branch: wip/prioceil
Commit: 96dcbdd2cc2fa09ed5674e5a0b300eed441cc0b2
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=96dcbdd2cc2fa09ed5674e5a0b300eed441cc0b2

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
return 0;
 }
 


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case /wrt mutex object reuse

2016-02-25 Thread git repository hosting
Module: xenomai-3
Branch: wip/prioceil
Commit: a600a6ff1100ec7900ff458cc16b654a4305846f
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a600a6ff1100ec7900ff458cc16b654a4305846f

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index ae82fc1..151c2f3 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
return 0;
 }
 


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Jan Kiszka : smokey/posix-mutex: Fix test case /wrt mutex object reuse

2016-02-25 Thread git repository hosting
Module: xenomai-3
Branch: wip/prioceil
Commit: 1a93e574d92681abfc2bc048966fae0b796bf9e1
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=1a93e574d92681abfc2bc048966fae0b796bf9e1

Author: Jan Kiszka 
Date:   Thu Feb 25 11:29:00 2016 +0100

smokey/posix-mutex: Fix test case /wrt mutex object reuse

Mutex objects created on the stack must be properly destroyed after use.
Otherwise, succeeding tests that use the same stack layout will consider
them busy and refuse to recreate the mutexes.

Signed-off-by: Jan Kiszka 

---

 testsuite/smokey/posix-mutex/posix-mutex.c |   26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c 
b/testsuite/smokey/posix-mutex/posix-mutex.c
index c17b50d..9ed279a 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -623,7 +623,10 @@ static int protect_raise(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -651,7 +654,10 @@ static int protect_lower(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -699,7 +705,10 @@ static int protect_weak(void)
if (!__T(ret, pthread_setschedparam(pthread_self(),
old_policy, _param)))
return ret;
-   
+
+   if (!__T(ret, pthread_mutex_destroy()))
+   return ret;
+
return 0;
 }
 
@@ -745,7 +754,11 @@ static int protect_nesting_protect(void)
 
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_high)) ||
+   !__T(ret, pthread_mutex_destroy(_very_high)))
+   return ret;
+
return 0;
 }
 
@@ -782,7 +795,10 @@ static int protect_nesting_pi(void)
/* PP boost just dropped: HIGH -> MEDIUM. */
if (!__Tassert(get_effective_prio() == THREAD_PRIO_MEDIUM))
return -EINVAL;
-   
+
+   if (!__T(ret, pthread_mutex_destroy(_pp)))
+   return ret;
+
return 0;
 }
 


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git