Closed fjtrujy closed 3 months ago
It is also working in real hardware through ps2client
:
➜ ps2 git:(platform_agnostic) ✗ ps2client -h 192.168.31.10 execee host:pthread-ps2-test.elf
loadelf: fname host:pthread-ps2-test.elf secname all
Input ELF format filename = host:pthread-ps2-test.elf
1 00100000 00044f08 .....
Loaded, host:pthread-ps2-test.elf
start address 0x100228
gp address 00000000
read/write allocate memory 4000
Running tests...
=========================
Test iteration #0
=========================
Reuse test #1
Create test #1
Join test #1
Join test #2
Join test #3
Join test #4
Kill test #1
Exit test #1
Exit test #2
Exit test #3
Priority test #1
Priority test #2
Valid test #1
Valid test #2
Self test #1
Self test #2
Equal test #1
Count test #1
Delay test #1
Delay test #2
Once test #1
Once test #2
Once test #3
Once test #4
TSD test #1
TSD test #2
Detach test #1
Mutex test #1
Mutex test #1(e)
Mutex test #1(n)
Mutex test #1(r)
Mutex test #2
Mutex test #2(e)
Mutex test #2(r)
Mutex test #3
Mutex test #3(e)
Mutex test #3(r)
Mutex test #4
Mutex test #5
Mutex test #6
Mutex test #6e
Mutex test #6es
Mutex test #6n
Mutex test #6r
Mutex test #6rs
Mutex test #6s
Mutex test #7e
Mutex test #7n
Mutex test #8e
Mutex test #8r
Semaphore test #1
Semaphore test #2
Semaphore test #3
Semaphore test #4
Semaphore test #4t
Semaphore test #5
Semaphore test #6
Condvar test #1
Condvar test #1-1
Condvar test #1-2
Condvar test #2
Condvar test #2-1
Condvar test #3
Condvar test #3-1
Condvar test #3-2
Condvar test #3-3
Condvar test #4
Condvar test #5
Condvar test #6
Condvar test #7
Condvar test #8
Condvar test #9
Barrier test #1
Barrier test #2
Barrier test #3
Barrier test #4
Barrier test #5
Spin test #1
Spin test #2
Spin test #3
Spin test #4
Rwlock test #1
Rwlock test #2
Rwlock test #2t
Rwlock test #3
Rwlock test #3t
Rwlock test #4
Rwlock test #4t
Rwlock test #5t
Rwlock test #6
Rwlock test #6t2
Rwlock test #7
Rwlock test #8
Cancel test #1
Cancel test #2
Cancel test #3
Test not run - async cancellation not supported
Cancel test #4
Cancel test #5
Test not run - async cancellation not supported
Cancel test #6a
Test not run - async cancellation not supported
Cancel test #6d
Cleanup test #0
Test not run - async cancellation not supported
Cleanup test #1
Test not run - async cancellation not supported
Cleanup test #2
Test not run - async cancellation not supported
Cleanup test #3
Test not run - async cancellation not supported
Exception test #1
Test N/A for this compiler environment.
Exception test #3
Test N/A for this compiler environment.
Benchmark test #1
=============================================================================
Test Total(msec) average(usec)
Dummy call x 2 7 0.070
Simple Critical Section 243 2.430
.............................................................................
PTHREAD_MUTEX_DEFAULT 53 0.530
PTHREAD_MUTEX_NORMAL 55 0.550
PTHREAD_MUTEX_ERRORCHECK 163 1.630
PTHREAD_MUTEX_RECURSIVE 165 1.650
=============================================================================
Benchmark test #2
=============================================================================
10000 iterations, four locks/unlocks per iteration.
Test Total(msec) average(usec)
PTHREAD_MUTEX_DEFAULT 167 4.175
PTHREAD_MUTEX_NORMAL 192 4.800
PTHREAD_MUTEX_ERRORCHECK 342 8.550
PTHREAD_MUTEX_RECURSIVE 340 8.500
=============================================================================
Benchmark test #3
=============================================================================
100000 iterations.
Test Total(msec) average(usec)
.............................................................................
PTHREAD_MUTEX_DEFAULT (W9x,WNT) 32 0.320
PTHREAD_MUTEX_NORMAL (W9x,WNT) 32 0.320
PTHREAD_MUTEX_ERRORCHECK (W9x,WNT) 32 0.320
PTHREAD_MUTEX_RECURSIVE (W9x,WNT) 93 0.930
=============================================================================
Benchmark test #4
=============================================================================
Trylock plus unlock on an unlocked mutex.
100000 iterations.
Test Total(msec) average(usec)
PTHREAD_MUTEX_DEFAULT 53 0.530
PTHREAD_MUTEX_NORMAL 53 0.530
PTHREAD_MUTEX_ERRORCHECK 161 1.610
PTHREAD_MUTEX_RECURSIVE 162 1.620
=============================================================================
Stress test #1
=========================
Test iteration #1
=========================
Skipping Reuse test #1 (required to run first on first iteration only)
Create test #1
Create test #2
Create test #3
Join test #0
Join test #1
Join test #2
Join test #3
Join test #4
Kill test #1
Exit test #1
Exit test #2
Exit test #3
Priority test #1
Priority test #2
Valid test #1
Valid test #2
Self test #1
Self test #2
Equal test #1
Count test #1
Delay test #1
Delay test #2
Once test #1
Once test #2
Once test #3
Once test #4
TSD test #1
TSD test #2
Detach test #1
Mutex test #1
Mutex test #1(e)
Mutex test #1(n)
Mutex test #1(r)
Mutex test #2
Mutex test #2(e)
Mutex test #2(r)
Mutex test #3
Mutex test #3(e)
Mutex test #3(r)
Mutex test #4
Mutex test #5
Mutex test #6
Mutex test #6e
Mutex test #6es
Mutex test #6n
Mutex test #6r
Mutex test #6rs
Mutex test #6s
Mutex test #7e
Mutex test #7n
Mutex test #7r
Mutex test #8
Mutex test #8e
Mutex test #8n
Mutex test #8r
Semaphore test #1
Semaphore test #2
Semaphore test #3
Semaphore test #4
Semaphore test #4t
Semaphore test #5
Semaphore test #6
Condvar test #1
Condvar test #1-1
Condvar test #1-2
Condvar test #2
Condvar test #2-1
Condvar test #3
Condvar test #3-1
Condvar test #3-2
Condvar test #3-3
Condvar test #4
Condvar test #5
Condvar test #6
Condvar test #8
Condvar test #9
Barrier test #1
Barrier test #2
Barrier test #3
Barrier test #4
Barrier test #5
Spin test #1
Spin test #2
Spin test #3
Spin test #4
Rwlock test #1
Rwlock test #2
Rwlock test #2t
Rwlock test #3
Rwlock test #3t
Rwlock test #4
Rwlock test #4t
Rwlock test #5
Rwlock test #5t
Rwlock test #6
Rwlock test #6t
Rwlock test #6t2
Rwlock test #7
Rwlock test #8
Cancel test #1
Cancel test #2
Cancel test #3
Test not run - async cancellation not supported
Cancel test #4
Cancel test #5
Test not run - async cancellation not supported
Cancel test #6a
Test not run - async cancellation not supported
Cancel test #6d
Cleanup test #0
Test not run - async cancellation not supported
Cleanup test #1
Test not run - async cancellation not supported
Cleanup test #2
Test not run - async cancellation not supported
Cleanup test #3
Test not run - async cancellation not supported
Exception test #1
Test N/A for this compiler environment.
Exception test #3
Test N/A for this compiler environment.
Benchmark test #1
=============================================================================
Test Total(msec) average(usec)
Dummy call x 2 7 0.070
Dummy call -> Interlocked with cond x 2 45 0.450
InterlockedOp x 2 12 0.120
Simple Critical Section 242 2.420
.............................................................................
PTHREAD_MUTEX_DEFAULT 55 0.550
PTHREAD_MUTEX_NORMAL 53 0.530
PTHREAD_MUTEX_ERRORCHECK 163 1.630
PTHREAD_MUTEX_RECURSIVE 165 1.650
=============================================================================
Benchmark test #2
=============================================================================
10000 iterations, four locks/unlocks per iteration.
Test Total(msec) average(usec)
PTHREAD_MUTEX_DEFAULT 20479 511.975
PTHREAD_MUTEX_NORMAL 20535 513.375
PTHREAD_MUTEX_ERRORCHECK 20671 516.775
PTHREAD_MUTEX_RECURSIVE 20659 516.475
=============================================================================
Benchmark test #3
=============================================================================
100000 iterations.
Test Total(msec) average(usec)
.............................................................................
PTHREAD_MUTEX_DEFAULT (W9x,WNT) 32 0.320
PTHREAD_MUTEX_NORMAL (W9x,WNT) 33 0.330
PTHREAD_MUTEX_ERRORCHECK (W9x,WNT) 31 0.310
PTHREAD_MUTEX_RECURSIVE (W9x,WNT) 95 0.950
=============================================================================
Benchmark test #4
=============================================================================
Trylock plus unlock on an unlocked mutex.
100000 iterations.
Test Total(msec) average(usec)
PTHREAD_MUTEX_DEFAULT 53 0.530
PTHREAD_MUTEX_NORMAL 54 0.540
PTHREAD_MUTEX_ERRORCHECK 162 1.620
PTHREAD_MUTEX_RECURSIVE 163 1.630
=============================================================================
Stress test #1
Tests complete!
Now all the test from
pthread-embedded
are passing correctly: