support if: else: endif: conditional tests
[nobug.git] / tests / 35resourcethreaded.tests
blobcdb40147640eb9ac9b004309c04d7800ec73cfa2
2 TESTING "resource tracker, w/ threads" ./test_nobug_resources_threaded_mt_alpha
5 TEST "resource threaded, waiting/waiting, multithreading/alpha" resourcethreaded_waiting_waiting <<END
6 err: ECHO:
7 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
8 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: waiting
9 err: ECHO: .*: main_1: main: create thread
10 err: ECHO: .*: thread_2: threadfn: thread startup
11 err: ECHO: .*: thread_2: threadfn: enter direct
12 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
13 err: RESOURCE_LEAVE: .*: thread_2: threadfn: type: test@.*: thread: waiting
14 err: ECHO: .*: thread_2: threadfn: thread finished
15 err: ECHO: .*: main_1: main: thread joined
16 err: RESOURCE_LEAVE: .*: main_1: main: type: test@.*: main: waiting
17 err: RESOURCE_FORGET: .*: main_1: main: type: test@
18 END
21 TEST "resource threaded, waiting/exclusive, multithreading/alpha" resourcethreaded_waiting_exclusive <<END
22 err: ECHO:
23 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
24 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: waiting
25 err: ECHO: .*: main_1: main: create thread
26 err: ECHO: .*: thread_2: threadfn: thread startup
27 err: ECHO: .*: thread_2: threadfn: enter via wait
28 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
29 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->exclusive
30 err: RESOURCE_LEAVE: .*: thread_2: threadfn: type: test@.*: thread: exclusive
31 err: ECHO: .*: thread_2: threadfn: thread finished
32 err: ECHO: .*: main_1: main: thread joined
33 err: RESOURCE_LEAVE: .*: main_1: main: type: test@.*: main: waiting
34 err: RESOURCE_FORGET: .*: main_1: main: type: test@
35 END
38 TEST "resource threaded, waiting/recursive, multithreading/alpha" resourcethreaded_waiting_recursive <<END
39 err: ECHO:
40 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
41 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: waiting
42 err: ECHO: .*: main_1: main: create thread
43 err: ECHO: .*: thread_2: threadfn: thread startup
44 err: ECHO: .*: thread_2: threadfn: enter via wait
45 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
46 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->recursive
47 err: RESOURCE_LEAVE: .*: thread_2: threadfn: type: test@.*: thread: recursive
48 err: ECHO: .*: thread_2: threadfn: thread finished
49 err: ECHO: .*: main_1: main: thread joined
50 err: RESOURCE_LEAVE: .*: main_1: main: type: test@.*: main: waiting
51 err: RESOURCE_FORGET: .*: main_1: main: type: test@
52 END
55 TEST "resource threaded, waiting/shared, multithreading/alpha" resourcethreaded_waiting_shared <<END
56 err: ECHO:
57 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
58 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: waiting
59 err: ECHO: .*: main_1: main: create thread
60 err: ECHO: .*: thread_2: threadfn: thread startup
61 err: ECHO: .*: thread_2: threadfn: enter via wait
62 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
63 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->shared
64 err: RESOURCE_LEAVE: .*: thread_2: threadfn: type: test@.*: thread: shared
65 err: ECHO: .*: thread_2: threadfn: thread finished
66 err: ECHO: .*: main_1: main: thread joined
67 err: RESOURCE_LEAVE: .*: main_1: main: type: test@.*: main: waiting
68 err: RESOURCE_FORGET: .*: main_1: main: type: test@
69 END
72 TEST "resource threaded, exclusive/waiting, multithreading/alpha" resourcethreaded_exclusive_waiting <<END
73 err: ECHO:
74 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
75 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: exclusive
76 err: ECHO: .*: main_1: main: create thread
77 err: ECHO: .*: thread_2: threadfn: thread startup
78 err: ECHO: .*: thread_2: threadfn: enter direct
79 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
80 err: RESOURCE_LEAVE: .*: thread_2: threadfn: type: test@.*: thread: waiting
81 err: ECHO: .*: thread_2: threadfn: thread finished
82 err: ECHO: .*: main_1: main: thread joined
83 err: RESOURCE_LEAVE: .*: main_1: main: type: test@.*: main: exclusive
84 err: RESOURCE_FORGET: .*: main_1: main: type: test@
85 END
88 TEST "resource threaded, exclusive/exclusive, multithreading/alpha" resourcethreaded_exclusive_exclusive <<END
89 err: ECHO:
90 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
91 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: exclusive
92 err: ECHO: .*: main_1: main: create thread
93 err: ECHO: .*: thread_2: threadfn: thread startup
94 err: ECHO: .*: thread_2: threadfn: enter via wait
95 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
96 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->exclusive
97 err: RESOURCE_ASSERT_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->exclusive: resource hold by another thread
98 err: RESOURCE_DUMP: .*: thread_2: threadfn: .* type:test: hold by 2 entities:
99 err: RESOURCE_DUMP:     .* thread thread_2:.* waiting
100 err: RESOURCE_DUMP:     .* main main_1:.* exclusive
101 err: BACKTRACE:
102 err: .*
103 return: !0
107 TEST "resource threaded, exclusive/recursive, multithreading/alpha" resourcethreaded_exclusive_recursive <<END
108 err: ECHO:
109 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
110 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: exclusive
111 err: ECHO: .*: main_1: main: create thread
112 err: ECHO: .*: thread_2: threadfn: thread startup
113 err: ECHO: .*: thread_2: threadfn: enter via wait
114 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
115 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->recursive
116 err: RESOURCE_ASSERT_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->recursive: resource hold by another thread
117 err: RESOURCE_DUMP: .*: thread_2: threadfn: .* type:test: hold by 2 entities:
118 err: RESOURCE_DUMP:     .* thread thread_2:.* waiting
119 err: RESOURCE_DUMP:     .* main main_1:.* exclusive
120 err: BACKTRACE:
121 err: .*
122 return: !0
126 TEST "resource threaded, exclusive/shared, multithreading/alpha" resourcethreaded_exclusive_shared <<END
127 err: ECHO:
128 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
129 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: exclusive
130 err: ECHO: .*: main_1: main: create thread
131 err: ECHO: .*: thread_2: threadfn: thread startup
132 err: ECHO: .*: thread_2: threadfn: enter via wait
133 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
134 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->shared
135 err: RESOURCE_ASSERT_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->shared: resource hold by another thread nonshared
136 err: RESOURCE_DUMP: .*: thread_2: threadfn: .* type:test: hold by 2 entities:
137 err: RESOURCE_DUMP:     .* thread thread_2:.* waiting
138 err: RESOURCE_DUMP:     .* main main_1:.* exclusive
139 err: BACKTRACE:
140 err: .*
141 return: !0
145 TEST "resource threaded, recursive/waiting, multithreading/alpha" resourcethreaded_recursive_waiting <<END
146 err: ECHO:
147 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
148 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: recursive
149 err: ECHO: .*: main_1: main: create thread
150 err: ECHO: .*: thread_2: threadfn: thread startup
151 err: ECHO: .*: thread_2: threadfn: enter direct
152 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
153 err: RESOURCE_LEAVE: .*: thread_2: threadfn: type: test@.*: thread: waiting
154 err: ECHO: .*: thread_2: threadfn: thread finished
155 err: ECHO: .*: main_1: main: thread joined
156 err: RESOURCE_LEAVE: .*: main_1: main: type: test@.*: main: recursive
157 err: RESOURCE_FORGET: .*: main_1: main: type: test@
161 TEST "resource threaded, recursive/exclusive, multithreading/alpha" resourcethreaded_recursive_exclusive <<END
162 err: ECHO:
163 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
164 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: recursive
165 err: ECHO: .*: main_1: main: create thread
166 err: ECHO: .*: thread_2: threadfn: thread startup
167 err: ECHO: .*: thread_2: threadfn: enter via wait
168 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
169 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->exclusive
170 err: RESOURCE_ASSERT_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->exclusive: resource hold by another thread
171 err: RESOURCE_DUMP: .*: thread_2: threadfn: .* type:test: hold by 2 entities:
172 err: RESOURCE_DUMP:     .* thread thread_2:.* waiting
173 err: RESOURCE_DUMP:     .* main main_1:.* recursive
174 err: BACKTRACE:
175 err: .*
176 return: !0
180 TEST "resource threaded, recursive/recursive, multithreading/alpha" resourcethreaded_recursive_recursive <<END
181 err: ECHO:
182 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
183 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: recursive
184 err: ECHO: .*: main_1: main: create thread
185 err: ECHO: .*: thread_2: threadfn: thread startup
186 err: ECHO: .*: thread_2: threadfn: enter via wait
187 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
188 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->recursive
189 err: RESOURCE_ASSERT_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->recursive: resource hold by another thread
190 err: RESOURCE_DUMP: .*: thread_2: threadfn: .* type:test: hold by 2 entities:
191 err: RESOURCE_DUMP:     .* thread thread_2:.* waiting
192 err: RESOURCE_DUMP:     .* main main_1:.* recursive
193 err: BACKTRACE:
194 err: .*
195 return: !0
199 TEST "resource threaded, recursive/shared, multithreading/alpha" resourcethreaded_recursive_shared <<END
200 err: ECHO:
201 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
202 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: recursive
203 err: ECHO: .*: main_1: main: create thread
204 err: ECHO: .*: thread_2: threadfn: thread startup
205 err: ECHO: .*: thread_2: threadfn: enter via wait
206 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
207 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->shared
208 err: RESOURCE_ASSERT_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->shared: resource hold by another thread nonshared
209 err: RESOURCE_DUMP: .*: thread_2: threadfn: .* type:test: hold by 2 entities:
210 err: RESOURCE_DUMP:     .* thread thread_2:.* waiting
211 err: RESOURCE_DUMP:     .* main main_1:.* recursive
212 err: BACKTRACE:
213 err: .*
214 return: !0
218 TEST "resource threaded, shared/waiting, multithreading/alpha" resourcethreaded_shared_waiting <<END
219 err: ECHO:
220 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
221 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: shared
222 err: ECHO: .*: main_1: main: create thread
223 err: ECHO: .*: thread_2: threadfn: thread startup
224 err: ECHO: .*: thread_2: threadfn: enter direct
225 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
226 err: RESOURCE_LEAVE: .*: thread_2: threadfn: type: test@.*: thread: waiting
227 err: ECHO: .*: thread_2: threadfn: thread finished
228 err: ECHO: .*: main_1: main: thread joined
229 err: RESOURCE_LEAVE: .*: main_1: main: type: test@.*: main: shared
230 err: RESOURCE_FORGET: .*: main_1: main: type: test@
234 TEST "resource threaded, shared/exclusive, multithreading/alpha" resourcethreaded_shared_exclusive <<END
235 err: ECHO:
236 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
237 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: shared
238 err: ECHO: .*: main_1: main: create thread
239 err: ECHO: .*: thread_2: threadfn: thread startup
240 err: ECHO: .*: thread_2: threadfn: enter via wait
241 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
242 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->exclusive
243 err: RESOURCE_ASSERT_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->exclusive: resource hold by another thread
244 err: RESOURCE_DUMP: .*: thread_2: threadfn: .* type:test: hold by 2 entities:
245 err: RESOURCE_DUMP:     .* thread thread_2:.* waiting
246 err: RESOURCE_DUMP:     .* main main_1:.* shared
247 err: BACKTRACE:
248 err: .*
249 return: !0
253 TEST "resource threaded, shared/recursive, multithreading/alpha" resourcethreaded_shared_recursive <<END
254 err: ECHO:
255 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
256 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: shared
257 err: ECHO: .*: main_1: main: create thread
258 err: ECHO: .*: thread_2: threadfn: thread startup
259 err: ECHO: .*: thread_2: threadfn: enter via wait
260 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
261 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->recursive
262 err: RESOURCE_ASSERT_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->recursive: resource hold by another thread
263 err: RESOURCE_DUMP: .*: thread_2: threadfn: .* type:test: hold by 2 entities:
264 err: RESOURCE_DUMP:     .* thread thread_2:.* waiting
265 err: RESOURCE_DUMP:     .* main main_1:.* shared
266 err: BACKTRACE:
267 err: .*
268 return: !0
272 TEST "resource threaded, shared/shared, multithreading/alpha" resourcethreaded_shared_shared <<END
273 err: ECHO:
274 err: RESOURCE_ANNOUNCE: .*: main_1: main: type: test@
275 err: RESOURCE_ENTER: .*: main_1: main: type: test@.*: main: shared
276 err: ECHO: .*: main_1: main: create thread
277 err: ECHO: .*: thread_2: threadfn: thread startup
278 err: ECHO: .*: thread_2: threadfn: enter via wait
279 err: RESOURCE_ENTER: .*: thread_2: threadfn: type: test@.*: thread: waiting
280 err: RESOURCE_STATE: .*: thread_2: threadfn: type: test@.*: thread: waiting->shared
281 err: RESOURCE_LEAVE: .*: thread_2: threadfn: type: test@.*: thread: shared
282 err: ECHO: .*: thread_2: threadfn: thread finished
283 err: ECHO: .*: main_1: main: thread joined
284 err: RESOURCE_LEAVE: .*: main_1: main: type: test@.*: main: shared
285 err: RESOURCE_FORGET: .*: main_1: main: type: test@