On some platforms do_work_dummy() (if compiled without any optimizations,
and it's by default) executes longer than the specified timeout of 100 ms.

Therefore there is a very small chance that TL may lock the mutex during
sleep() in the main thread, and most of the time the tests will fail with:
../../../functional/threads/pi_test/pitest-2.c: 222: FAIL: Thread TB1: lock 
returned 0 Success, slept 0.000008

To overcome this I increased the timeout value for TBs. It doesn't break the 
logic.

Signed-off-by: Stanislav Kholmanskikh <[email protected]>
---
 .../functional/threads/pi_test/pitest-2.c          |    4 ++--
 .../functional/threads/pi_test/pitest-3.c          |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c 
b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c
index ee810eb..dda51c3 100644
--- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c
+++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c
@@ -67,8 +67,8 @@ struct thread_param {
 } tp[] = {
        {
        0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0}, {
-       1, 0, 100, 2, SCHED_FIFO, "TP1", 0, 0, 0, 0}, {
-       2, 0, 100, 5, SCHED_FIFO, "TP2", 0, 0, 0, 0}, {
+       1, 0, 500, 2, SCHED_FIFO, "TP1", 0, 0, 0, 0}, {
+       2, 0, 500, 5, SCHED_FIFO, "TP2", 0, 0, 0, 0}, {
        3, 0, 0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0}, {
        4, 0, 0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0}, {
        5, 0, 0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0}, {
diff --git 
a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c 
b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c
index e0438d6..5e925a5 100644
--- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c
+++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c
@@ -68,8 +68,8 @@ struct thread_param {
 } tp[] = {
        {
        0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0}, {
-       1, 0, 100, 2, SCHED_FIFO, "TP1", 0, 0, 0, 0}, {
-       1, 0, 100, 5, SCHED_FIFO, "TP2", 0, 0, 0, 0}, {
+       1, 0, 500, 2, SCHED_FIFO, "TP1", 0, 0, 0, 0}, {
+       1, 0, 500, 5, SCHED_FIFO, "TP2", 0, 0, 0, 0}, {
        2, 0, 0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0}, {
        3, 0, 0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0}, {
        4, 0, 0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0}, {
-- 
1.7.1


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to