source: rtems/testsuites/psxtests/psx05/psx05.scn @ 9a4eca5

Last change on this file since 9a4eca5 was ce6e9ec2, checked in by Sebastian Huber <sebastian.huber@…>, on Jun 14, 2016 at 4:50:38 AM

posix: pthread_mutexattr_setprioceiling()

Accept all priority values in pthread_mutexattr_setprioceiling(). This
is in line with POSIX and FreeBSD. The priority is validated in
pthread_mutex_init(). Validate the priority only for priority ceiling
mutexes.

  • Property mode set to 100644
File size: 5.3 KB
Line 
1*** BEGIN OF TEST PSX 5 ***
2Init's ID is 0x0b010001
3Init: pthread_mutexattr_init - EINVAL (NULL attr)
4Init: pthread_mutexattr_init - SUCCESSFUL
5Init: mutex protocol is (0) -- PTHREAD_PRIO_NONE
6Init: mutex priority ceiling is 254
7Init: mutex process shared is (0) -- PTHREAD_PROCESS_PRIVATE
8Init: pthread_mutexattr_destroy - SUCCESSFUL
9Init: pthread_mutexattr_destroy - EINVAL (NULL attr)
10Init: pthread_mutexattr_destroy - EINVAL (not initialized)
11
12Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)
13Init: pthread_mutexattr_getpshared - EINVAL (NULL pshared)
14Init: pthread_mutexattr_getpshared - EINVAL (not initialized)
15Init: pthread_mutexattr_setpshared - EINVAL (NULL attr)
16Init: pthread_mutexattr_setpshared - EINVAL (not initialized)
17
18Init: pthread_mutexattr_getprotocol - EINVAL (NULL attr)
19Init: pthread_mutexattr_getprotocol - EINVAL (NULL protocol)
20Init: pthread_mutexattr_getprotocol - EINVAL (not initialized)
21Init: pthread_mutexattr_setprotocol - EINVAL (NULL attr)
22Init: pthread_mutexattr_setprotocol - EINVAL (invalid protocol)
23Init: pthread_mutexattr_setprotocol - EINVAL (not initialized)
24
25Init: pthread_mutexattr_getprioceiling - EINVAL (NULL attr)
26Init: pthread_mutexattr_getprioceiling - EINVAL (NULL prioceiling)
27Init: pthread_mutexattr_getprioceiling - EINVAL (not initialized)
28Init: pthread_mutexattr_setprioceiling - EINVAL (NULL attr)
29Init: pthread_mutexattr_setprioceiling - SUCCESSFUL (priority INT_MAX)
30Init: pthread_mutexattr_setprioceiling - SUCCESSFUL (priority INT_MIN)
31Init: pthread_mutexattr_setprioceiling - EINVAL (not initialized)
32
33Init: pthread_mutex_init - EINVAL (NULL mutex_id)
34Init: pthread_mutex_init - EINVAL (not initialized attr)
35Init: pthread_mutex_init - EINVAL (bad protocol)
36Init: pthread_mutexattr_setprotocol - SUCCESSFUL
37Init: pthread_mutexattr_setprioceiling - SUCCESSFUL
38Init: pthread_mutex_init - EINVAL (bad priority ceiling)
39Init: Resetting mutex attributes
40Init: pthread_mutex_init - ENOSYS (process wide scope)
41Init: pthread_mutex_init - EINVAL (invalid scope)
42Init: pthread_mutex_init - EINVAL (invalid type)
43Init: Resetting mutex attributes
44Init: Changing mutex attributes
45Init: mutex protocol is (1) -- PTHREAD_PRIO_INHERIT
46Init: mutex priority ceiling is 128
47Init: mutex process shared is (1) -- PTHREAD_PROCESS_SHARED
48Init: Resetting mutex attributes
49Init: pthread_mutex_init - SUCCESSFUL
50Init: pthread_mutex_init - EBUSY (reinitialize an existing mutex) - skipped
51Init: pthread_mutex_trylock - EINVAL (illegal ID)
52Init: pthread_mutex_trylock - SUCCESSFUL
53Init: pthread_mutex_trylock - EDEADLK (already locked)
54Init: pthread_mutex_lock - EINVAL (NULL id)
55Init: pthread_mutex_unlock - EINVAL (NULL id)
56Init: pthread_mutex_lock - EDEADLK (already locked)
57Init: Sleep 1 second
58Task: pthread_mutex_trylock already locked
59Task: pthread_mutex_lock unavailable
60Init: pthread_mutex_unlock - EINVAL (invalid id)
61Init: pthread_mutex_unlock - SUCCESSFUL
62Init: pthread_mutex_unlock - EPERM (not owner)
63Init: pthread_mutex_timedlock - time out in 1/2 second
64Task: mutex acquired
65Task: sleep for 2 seconds
66Init: pthread_mutex_timedlock - time out in the past
67Init: pthread_mutex_timedlock - EAGAIN (timeout)
68
69Init: pthread_mutex_init - SUCCESSFUL
70Init: pthread_mutex_init - EAGAIN (too many)
71Init: pthread_mutexattr_destroy - SUCCESSFUL
72Init: pthread_mutex_destroy - SUCCESSFUL
73Init: pthread_mutex_destroy - EINVAL (invalid id)
74
75Init: pthread_mutexattr_init - SUCCESSFUL
76Init: pthread_mutex_init - SUCCESSFUL
77Init: pthread_mutex_trylock - SUCCESSFUL
78Init: pthread_mutex_destroy - EBUSY (already locked)
79Init: pthread_mutex_unlock - SUCCESSFUL
80Init: pthread_mutex_destroy - SUCCESSFUL
81
82Init: pthread_mutexattr_init - SUCCESSFUL
83Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_INHERIT)
84Init: pthread_mutex_init - SUCCESSFUL
85Init: pthread_mutex_trylock - SUCCESSFUL
86Init: pthread_setschedparam - Setting Task2 priority to highest
87Task 2: pthread_mutex_lock unavailable (inherit case)
88Init: pthread_getschedparam - priority = 2
89Init: pthread_mutex_unlock - SUCCESSFUL
90Task 2: mutex acquired
91Task 2: unlock Mutex 2
92Task 2: exit
93Init: pthread_mutexattr_destroy - SUCCESSFUL
94Init: pthread_mutex_destroy - SUCCESSFUL
95
96Init: pthread_mutexattr_init - SUCCESSFUL
97Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_PROTECT)
98Init: pthread_mutex_init - SUCCESSFUL
99Init: pthread_mutex_getprioceiling - EINVAL (invalid id)
100Init: pthread_mutex_getprioceiling - EINVAL (NULL ceiling)
101Init: pthread_mutex_getprioceiling - 254
102Init: pthread_mutex_setprioceiling - EINVAL (invalid id)
103Init: pthread_mutex_setprioceiling - EINVAL (illegal priority)
104Init: pthread_mutex_setprioceiling - EINVAL (NULL ceiling)
105Init: pthread_mutex_setprioceiling - new ceiling = 200
106Init: pthread_mutex_setprioceiling - old ceiling = 254
107Init: pthread_getschedparam - priority = 2
108Init: pthread_mutex_trylock - SUCCESSFUL
109Init: pthread_getschedparam - priority = 2
110Init: pthread_setschedparam - set Task3 priority to highest
111Init: Sleep 1 second
112Task 3: pthread_mutex_lock unavailable (inherit case)
113Init: pthread_mutex_unlock - SUCCESSFUL
114Task 3: mutex acquired
115Task 3: unlock Mutex 2
116Task 3: pthread_getschedparam priority = 199
117Task 3: exit
118Init: pthread_mutex_getprioceiling- ceiling = 200
119Init: pthread_setschedparam - set Init priority to highest
120Init: pthread_mutex_lock - EINVAL (priority ceiling violation)
121Init: Recursive Mutex
122*** END OF TEST PSX 5 ***
Note: See TracBrowser for help on using the repository browser.