aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/abqtest.c18
-rw-r--r--mps/code/amcss.c9
-rw-r--r--mps/code/amcsshe.c9
-rw-r--r--mps/code/amcssth.c9
-rw-r--r--mps/code/amsss.c9
-rw-r--r--mps/code/amssshe.c9
-rw-r--r--mps/code/apss.c9
-rw-r--r--mps/code/arenacv.c9
-rw-r--r--mps/code/awlut.c9
-rw-r--r--mps/code/awluthe.c9
-rw-r--r--mps/code/awlutth.c9
-rw-r--r--mps/code/btcv.c6
-rw-r--r--mps/code/cbstest.c6
-rw-r--r--mps/code/comm.gmk15
-rw-r--r--mps/code/eventsql.c4
-rw-r--r--mps/code/exposet0.c9
-rw-r--r--mps/code/expt825.c8
-rw-r--r--mps/code/finalcv.c9
-rw-r--r--mps/code/finaltest.c8
-rw-r--r--mps/code/libcbt.c17
-rw-r--r--mps/code/locbwcss.c11
-rw-r--r--mps/code/lockcov.c9
-rw-r--r--mps/code/lockutw3.c9
-rw-r--r--mps/code/locusss.c6
-rw-r--r--mps/code/locv.c9
-rw-r--r--mps/code/messtest.c6
-rw-r--r--mps/code/mpmss.c9
-rw-r--r--mps/code/mpsicv.c9
-rw-r--r--mps/code/mv2test.c7
-rw-r--r--mps/code/poolncv.c22
-rw-r--r--mps/code/qs.c7
-rw-r--r--mps/code/sacss.c9
-rw-r--r--mps/code/segsmss.c9
-rw-r--r--mps/code/steptest.c9
-rw-r--r--mps/code/testlib.c12
-rw-r--r--mps/code/testlib.h4
-rw-r--r--mps/code/walkt0.c9
-rw-r--r--mps/code/zcoll.c7
-rw-r--r--mps/code/zmess.c7
39 files changed, 165 insertions, 195 deletions
diff --git a/mps/code/abqtest.c b/mps/code/abqtest.c
index 27288a40437..7de0ee537a7 100644
--- a/mps/code/abqtest.c
+++ b/mps/code/abqtest.c
@@ -1,7 +1,7 @@
1/* abqtest.c: AVAILABLE BLOCK QUEUE TEST 1/* abqtest.c: AVAILABLE BLOCK QUEUE TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 */ 5 */
6 6
7#include "abq.h" 7#include "abq.h"
@@ -149,7 +149,6 @@ static void step(void)
149 149
150extern int main(int argc, char *argv[]) 150extern int main(int argc, char *argv[])
151{ 151{
152 Res res;
153 mps_arena_t arena; 152 mps_arena_t arena;
154 int i; 153 int i;
155 154
@@ -160,26 +159,23 @@ extern int main(int argc, char *argv[])
160 die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE), 159 die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
161 "mps_arena_create"); 160 "mps_arena_create");
162 161
163 res = ABQInit((Arena)arena, &abq, NULL, ABQ_SIZE); 162 die(ABQInit((Arena)arena, &abq, NULL, ABQ_SIZE),
164 if (res == ResOK) { 163 "ABQInit");
165 abqSize = ABQ_SIZE; 164
166 } else { 165 abqSize = ABQ_SIZE;
167 printf("ABQCreate returned %d\n",res);
168 return 1;
169 }
170 166
171 for (i = 0; i < TEST_ITER; i++) { 167 for (i = 0; i < TEST_ITER; i++) {
172 step(); 168 step();
173 } 169 }
174 170
175 printf("All tests passed.\n"); 171 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
176 return 0; 172 return 0;
177} 173}
178 174
179 175
180/* C. COPYRIGHT AND LICENSE 176/* C. COPYRIGHT AND LICENSE
181 * 177 *
182 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 178 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
183 * All rights reserved. This is an open source license. Contact 179 * All rights reserved. This is an open source license. Contact
184 * Ravenbrook for commercial licensing options. 180 * Ravenbrook for commercial licensing options.
185 * 181 *
diff --git a/mps/code/amcss.c b/mps/code/amcss.c
index 388c4f8e71c..bf4b9741099 100644
--- a/mps/code/amcss.c
+++ b/mps/code/amcss.c
@@ -1,7 +1,7 @@
1/* amcss.c: POOL CLASS AMC STRESS TEST 1/* amcss.c: POOL CLASS AMC STRESS TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 */ 6 */
7 7
@@ -315,7 +315,7 @@ static void test(mps_arena_t arena)
315 mps_fmt_destroy(format); 315 mps_fmt_destroy(format);
316} 316}
317 317
318int main(int argc, char **argv) 318int main(int argc, char *argv[])
319{ 319{
320 mps_arena_t arena; 320 mps_arena_t arena;
321 mps_thr_t thread; 321 mps_thr_t thread;
@@ -334,15 +334,14 @@ int main(int argc, char **argv)
334 report(arena); 334 report(arena);
335 mps_arena_destroy(arena); 335 mps_arena_destroy(arena);
336 336
337 fflush(stdout); /* synchronize */ 337 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
338 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
339 return 0; 338 return 0;
340} 339}
341 340
342 341
343/* C. COPYRIGHT AND LICENSE 342/* C. COPYRIGHT AND LICENSE
344 * 343 *
345 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 344 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
346 * All rights reserved. This is an open source license. Contact 345 * All rights reserved. This is an open source license. Contact
347 * Ravenbrook for commercial licensing options. 346 * Ravenbrook for commercial licensing options.
348 * 347 *
diff --git a/mps/code/amcsshe.c b/mps/code/amcsshe.c
index 770870cfe8b..762497b98bc 100644
--- a/mps/code/amcsshe.c
+++ b/mps/code/amcsshe.c
@@ -1,7 +1,7 @@
1/* amcsshe.c: POOL CLASS AMC STRESS TEST WITH HEADER 1/* amcsshe.c: POOL CLASS AMC STRESS TEST WITH HEADER
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (c) 2002 Global Graphics Software. 5 * Portions copyright (c) 2002 Global Graphics Software.
6 */ 6 */
7 7
@@ -249,7 +249,7 @@ static void *test(void *arg, size_t s)
249} 249}
250 250
251 251
252int main(int argc, char **argv) 252int main(int argc, char *argv[])
253{ 253{
254 mps_arena_t arena; 254 mps_arena_t arena;
255 mps_thr_t thread; 255 mps_thr_t thread;
@@ -266,15 +266,14 @@ int main(int argc, char **argv)
266 mps_thread_dereg(thread); 266 mps_thread_dereg(thread);
267 mps_arena_destroy(arena); 267 mps_arena_destroy(arena);
268 268
269 fflush(stdout); /* synchronize */ 269 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
270 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
271 return 0; 270 return 0;
272} 271}
273 272
274 273
275/* C. COPYRIGHT AND LICENSE 274/* C. COPYRIGHT AND LICENSE
276 * 275 *
277 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 276 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
278 * All rights reserved. This is an open source license. Contact 277 * All rights reserved. This is an open source license. Contact
279 * Ravenbrook for commercial licensing options. 278 * Ravenbrook for commercial licensing options.
280 * 279 *
diff --git a/mps/code/amcssth.c b/mps/code/amcssth.c
index a81be4961d4..911c9977251 100644
--- a/mps/code/amcssth.c
+++ b/mps/code/amcssth.c
@@ -1,7 +1,7 @@
1/* amcssth.c: POOL CLASS AMC STRESS TEST WITH TWO THREADS 1/* amcssth.c: POOL CLASS AMC STRESS TEST WITH TWO THREADS
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (c) 2002 Global Graphics Software. 5 * Portions copyright (c) 2002 Global Graphics Software.
6 * 6 *
7 * .posix: This is Posix only. 7 * .posix: This is Posix only.
@@ -310,7 +310,7 @@ static void *fooey(void* childIsFinishedReturn)
310} 310}
311 311
312 312
313int main(int argc, char **argv) 313int main(int argc, char *argv[])
314{ 314{
315 mps_thr_t thread; 315 mps_thr_t thread;
316 pthread_t pthread1; 316 pthread_t pthread1;
@@ -337,15 +337,14 @@ int main(int argc, char **argv)
337 report(arena); 337 report(arena);
338 mps_arena_destroy(arena); 338 mps_arena_destroy(arena);
339 339
340 fflush(stdout); /* synchronize */ 340 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
341 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
342 return 0; 341 return 0;
343} 342}
344 343
345 344
346/* C. COPYRIGHT AND LICENSE 345/* C. COPYRIGHT AND LICENSE
347 * 346 *
348 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 347 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
349 * All rights reserved. This is an open source license. Contact 348 * All rights reserved. This is an open source license. Contact
350 * Ravenbrook for commercial licensing options. 349 * Ravenbrook for commercial licensing options.
351 * 350 *
diff --git a/mps/code/amsss.c b/mps/code/amsss.c
index 7906c8805bf..29f0aa47e3b 100644
--- a/mps/code/amsss.c
+++ b/mps/code/amsss.c
@@ -1,7 +1,7 @@
1/* amsss.c: POOL CLASS AMS STRESS TEST 1/* amsss.c: POOL CLASS AMS STRESS TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001-2002, 2006 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (c) 2002 Global Graphics Software. 5 * Portions copyright (c) 2002 Global Graphics Software.
6 * 6 *
7 * .design: Adapted from amcss.c, but not counting collections, just 7 * .design: Adapted from amcss.c, but not counting collections, just
@@ -198,7 +198,7 @@ static void *test(void *arg, size_t haveAmbigous)
198} 198}
199 199
200 200
201int main(int argc, char **argv) 201int main(int argc, char *argv[])
202{ 202{
203 mps_thr_t thread; 203 mps_thr_t thread;
204 mps_fmt_t format; 204 mps_fmt_t format;
@@ -247,15 +247,14 @@ int main(int argc, char **argv)
247 mps_thread_dereg(thread); 247 mps_thread_dereg(thread);
248 mps_arena_destroy(arena); 248 mps_arena_destroy(arena);
249 249
250 fflush(stdout); /* synchronize */ 250 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
251 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
252 return 0; 251 return 0;
253} 252}
254 253
255 254
256/* C. COPYRIGHT AND LICENSE 255/* C. COPYRIGHT AND LICENSE
257 * 256 *
258 * Copyright (C) 2001-2002, 2006 Ravenbrook Limited <http://www.ravenbrook.com/>. 257 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
259 * All rights reserved. This is an open source license. Contact 258 * All rights reserved. This is an open source license. Contact
260 * Ravenbrook for commercial licensing options. 259 * Ravenbrook for commercial licensing options.
261 * 260 *
diff --git a/mps/code/amssshe.c b/mps/code/amssshe.c
index 5457c13ee25..29a9fd2ebbf 100644
--- a/mps/code/amssshe.c
+++ b/mps/code/amssshe.c
@@ -1,7 +1,7 @@
1/* amssshe.c: POOL CLASS AMS STRESS TEST WITH HEADERS 1/* amssshe.c: POOL CLASS AMS STRESS TEST WITH HEADERS
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * 5 *
6 * .design: Adapted from amsss.c. 6 * .design: Adapted from amsss.c.
7 */ 7 */
@@ -155,7 +155,7 @@ static void *test(void *arg, size_t s)
155} 155}
156 156
157 157
158int main(int argc, char **argv) 158int main(int argc, char *argv[])
159{ 159{
160 mps_arena_t arena; 160 mps_arena_t arena;
161 mps_thr_t thread; 161 mps_thr_t thread;
@@ -170,15 +170,14 @@ int main(int argc, char **argv)
170 mps_thread_dereg(thread); 170 mps_thread_dereg(thread);
171 mps_arena_destroy(arena); 171 mps_arena_destroy(arena);
172 172
173 fflush(stdout); /* synchronize */ 173 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
174 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
175 return 0; 174 return 0;
176} 175}
177 176
178 177
179/* C. COPYRIGHT AND LICENSE 178/* C. COPYRIGHT AND LICENSE
180 * 179 *
181 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 180 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
182 * All rights reserved. This is an open source license. Contact 181 * All rights reserved. This is an open source license. Contact
183 * Ravenbrook for commercial licensing options. 182 * Ravenbrook for commercial licensing options.
184 * 183 *
diff --git a/mps/code/apss.c b/mps/code/apss.c
index e23aee22f24..3fcc7388437 100644
--- a/mps/code/apss.c
+++ b/mps/code/apss.c
@@ -1,7 +1,7 @@
1/* apss.c: AP MANUAL ALLOC STRESS TEST 1/* apss.c: AP MANUAL ALLOC STRESS TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 */ 6 */
7 7
@@ -171,7 +171,7 @@ static void testInArena(mps_arena_t arena, mps_pool_debug_option_s *options)
171} 171}
172 172
173 173
174int main(int argc, char **argv) 174int main(int argc, char *argv[])
175{ 175{
176 mps_arena_t arena; 176 mps_arena_t arena;
177 mps_pool_debug_option_s *bothOptions; 177 mps_pool_debug_option_s *bothOptions;
@@ -191,15 +191,14 @@ int main(int argc, char **argv)
191 testInArena(arena, bothOptions); 191 testInArena(arena, bothOptions);
192 mps_arena_destroy(arena); 192 mps_arena_destroy(arena);
193 193
194 fflush(stdout); /* synchronize */ 194 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
195 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
196 return 0; 195 return 0;
197} 196}
198 197
199 198
200/* C. COPYRIGHT AND LICENSE 199/* C. COPYRIGHT AND LICENSE
201 * 200 *
202 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 201 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
203 * All rights reserved. This is an open source license. Contact 202 * All rights reserved. This is an open source license. Contact
204 * Ravenbrook for commercial licensing options. 203 * Ravenbrook for commercial licensing options.
205 * 204 *
diff --git a/mps/code/arenacv.c b/mps/code/arenacv.c
index e797116bd3d..df43f9e5d88 100644
--- a/mps/code/arenacv.c
+++ b/mps/code/arenacv.c
@@ -1,7 +1,7 @@
1/* arenacv.c: ARENA COVERAGE TEST 1/* arenacv.c: ARENA COVERAGE TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * 5 *
6 * .coverage: At the moment, we're only trying to cover the new code 6 * .coverage: At the moment, we're only trying to cover the new code
7 * (partial mapping of the page table and vm overflow). 7 * (partial mapping of the page table and vm overflow).
@@ -402,7 +402,7 @@ static void testSize(Size size)
402#define TEST_ARENA_SIZE ((Size)16<<22) 402#define TEST_ARENA_SIZE ((Size)16<<22)
403 403
404 404
405int main(void) 405int main(int argc, char *argv[])
406{ 406{
407 void *block; 407 void *block;
408 408
@@ -416,15 +416,14 @@ int main(void)
416 416
417 testSize(TEST_ARENA_SIZE); 417 testSize(TEST_ARENA_SIZE);
418 418
419 fflush(stdout); /* synchronize */ 419 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
420 fprintf(stderr, "Conclusion: Failed to find any defects.\n");
421 return 0; 420 return 0;
422} 421}
423 422
424 423
425/* C. COPYRIGHT AND LICENSE 424/* C. COPYRIGHT AND LICENSE
426 * 425 *
427 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 426 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
428 * All rights reserved. This is an open source license. Contact 427 * All rights reserved. This is an open source license. Contact
429 * Ravenbrook for commercial licensing options. 428 * Ravenbrook for commercial licensing options.
430 * 429 *
diff --git a/mps/code/awlut.c b/mps/code/awlut.c
index 74f566639d3..31bbac200ed 100644
--- a/mps/code/awlut.c
+++ b/mps/code/awlut.c
@@ -1,7 +1,7 @@
1/* awlut.c: POOL CLASS AWL UNIT TEST 1/* awlut.c: POOL CLASS AWL UNIT TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * 5 *
6 * DESIGN 6 * DESIGN
7 * 7 *
@@ -294,7 +294,7 @@ static void *setup(void *v, size_t s)
294} 294}
295 295
296 296
297int main(int argc, char **argv) 297int main(int argc, char *argv[])
298{ 298{
299 struct guff_s guff; 299 struct guff_s guff;
300 mps_arena_t arena; 300 mps_arena_t arena;
@@ -316,15 +316,14 @@ int main(int argc, char **argv)
316 mps_thread_dereg(thread); 316 mps_thread_dereg(thread);
317 mps_arena_destroy(arena); 317 mps_arena_destroy(arena);
318 318
319 fflush(stdout); /* synchronize */ 319 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
320 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
321 return 0; 320 return 0;
322} 321}
323 322
324 323
325/* C. COPYRIGHT AND LICENSE 324/* C. COPYRIGHT AND LICENSE
326 * 325 *
327 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 326 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
328 * All rights reserved. This is an open source license. Contact 327 * All rights reserved. This is an open source license. Contact
329 * Ravenbrook for commercial licensing options. 328 * Ravenbrook for commercial licensing options.
330 * 329 *
diff --git a/mps/code/awluthe.c b/mps/code/awluthe.c
index ea08a3bdef7..7ee5a0c077c 100644
--- a/mps/code/awluthe.c
+++ b/mps/code/awluthe.c
@@ -1,7 +1,7 @@
1/* awluthe.c: POOL CLASS AWL UNIT TEST WITH OBJECT HEADERS 1/* awluthe.c: POOL CLASS AWL UNIT TEST WITH OBJECT HEADERS
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * 5 *
6 * DESIGN 6 * DESIGN
7 * 7 *
@@ -297,7 +297,7 @@ static void *setup(void *v, size_t s)
297} 297}
298 298
299 299
300int main(int argc, char **argv) 300int main(int argc, char *argv[])
301{ 301{
302 struct guff_s guff; 302 struct guff_s guff;
303 mps_arena_t arena; 303 mps_arena_t arena;
@@ -319,15 +319,14 @@ int main(int argc, char **argv)
319 mps_thread_dereg(thread); 319 mps_thread_dereg(thread);
320 mps_arena_destroy(arena); 320 mps_arena_destroy(arena);
321 321
322 fflush(stdout); /* synchronize */ 322 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
323 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
324 return 0; 323 return 0;
325} 324}
326 325
327 326
328/* C. COPYRIGHT AND LICENSE 327/* C. COPYRIGHT AND LICENSE
329 * 328 *
330 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 329 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
331 * All rights reserved. This is an open source license. Contact 330 * All rights reserved. This is an open source license. Contact
332 * Ravenbrook for commercial licensing options. 331 * Ravenbrook for commercial licensing options.
333 * 332 *
diff --git a/mps/code/awlutth.c b/mps/code/awlutth.c
index 3a5c9ee0fb1..cfe94ea7ca3 100644
--- a/mps/code/awlutth.c
+++ b/mps/code/awlutth.c
@@ -1,7 +1,7 @@
1/* awlutth.c: THREADING UNIT TEST USING POOL CLASS AWL 1/* awlutth.c: THREADING UNIT TEST USING POOL CLASS AWL
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * 5 *
6 * DESIGN 6 * DESIGN
7 * 7 *
@@ -309,7 +309,7 @@ static void *setup_thr(void *v)
309} 309}
310 310
311 311
312int main(int argc, char **argv) 312int main(int argc, char *argv[])
313{ 313{
314 mps_arena_t arena; 314 mps_arena_t arena;
315 pthread_t pthread1; 315 pthread_t pthread1;
@@ -327,15 +327,14 @@ int main(int argc, char **argv)
327 pthread_join(pthread1, NULL); 327 pthread_join(pthread1, NULL);
328 mps_arena_destroy(arena); 328 mps_arena_destroy(arena);
329 329
330 fflush(stdout); /* synchronize */ 330 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
331 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
332 return 0; 331 return 0;
333} 332}
334 333
335 334
336/* C. COPYRIGHT AND LICENSE 335/* C. COPYRIGHT AND LICENSE
337 * 336 *
338 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 337 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
339 * All rights reserved. This is an open source license. Contact 338 * All rights reserved. This is an open source license. Contact
340 * Ravenbrook for commercial licensing options. 339 * Ravenbrook for commercial licensing options.
341 * 340 *
diff --git a/mps/code/btcv.c b/mps/code/btcv.c
index fd411ee461b..b119a217d5d 100644
--- a/mps/code/btcv.c
+++ b/mps/code/btcv.c
@@ -1,7 +1,7 @@
1/* btss.c: BIT TABLE COVERAGE TEST 1/* btss.c: BIT TABLE COVERAGE TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * 5 *
6 * .readership: MPS developers 6 * .readership: MPS developers
7 * 7 *
@@ -564,14 +564,14 @@ int main(int argc, char *argv[])
564 564
565 btTests(btlo, bthi, btSize); 565 btTests(btlo, bthi, btSize);
566 566
567 printf("\nNo problems detected.\n"); 567 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
568 return 0; 568 return 0;
569} 569}
570 570
571 571
572/* C. COPYRIGHT AND LICENSE 572/* C. COPYRIGHT AND LICENSE
573 * 573 *
574 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 574 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
575 * All rights reserved. This is an open source license. Contact 575 * All rights reserved. This is an open source license. Contact
576 * Ravenbrook for commercial licensing options. 576 * Ravenbrook for commercial licensing options.
577 * 577 *
diff --git a/mps/code/cbstest.c b/mps/code/cbstest.c
index 818e9c61259..cb5744238dc 100644
--- a/mps/code/cbstest.c
+++ b/mps/code/cbstest.c
@@ -1,7 +1,7 @@
1/* cbstest.c: COALESCING BLOCK STRUCTURE TEST 1/* cbstest.c: COALESCING BLOCK STRUCTURE TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 */ 5 */
6 6
7#include "cbs.h" 7#include "cbs.h"
@@ -649,14 +649,14 @@ extern int main(int argc, char *argv[])
649 printf("Number of deleted large blocks: %ld\n", NDeleteBlocks); 649 printf("Number of deleted large blocks: %ld\n", NDeleteBlocks);
650 printf("Number of grown large blocks: %ld\n", NGrowBlocks); 650 printf("Number of grown large blocks: %ld\n", NGrowBlocks);
651 printf("Number of shrunk large blocks: %ld\n", NShrinkBlocks); 651 printf("Number of shrunk large blocks: %ld\n", NShrinkBlocks);
652 printf("\nNo problems detected.\n"); 652 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
653 return 0; 653 return 0;
654} 654}
655 655
656 656
657/* C. COPYRIGHT AND LICENSE 657/* C. COPYRIGHT AND LICENSE
658 * 658 *
659 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 659 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
660 * All rights reserved. This is an open source license. Contact 660 * All rights reserved. This is an open source license. Contact
661 * Ravenbrook for commercial licensing options. 661 * Ravenbrook for commercial licensing options.
662 * 662 *
diff --git a/mps/code/comm.gmk b/mps/code/comm.gmk
index bfdf9a20c7a..6346acbc191 100644
--- a/mps/code/comm.gmk
+++ b/mps/code/comm.gmk
@@ -232,10 +232,17 @@ all: mpmss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \
232# mv2test cannot be run because MV2 is broken 232# mv2test cannot be run because MV2 is broken
233# %%TARGET: When adding a new target, if target is suitable for the 233# %%TARGET: When adding a new target, if target is suitable for the
234# overnight tests, then add it here. 234# overnight tests, then add it here.
235testrun: mpmss apss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \ 235TESTCASES=abqtest amcss amcsshe amsss amssshe apss arenacv awlut \
236 mpsicv lockcov poolncv locv qs finalcv finaltest arenacv \ 236 awluthe btcv cbstest finalcv finaltest lockcov locv \
237 abqtest cbstest btcv messtest steptest walkt0 237 messtest mpmss mpsicv poolncv qs sacss segsmss steptest \
238 $(^:%=date && $(PFM)/$(VARIETY)/% &&) true 238 walkt0
239testrun: $(TESTCASES)
240 OUTPUT=$$(mktemp /tmp/mps-XXXXXX.log); \
241 echo "Logging test output to $$OUTPUT"; \
242 $(^:%=(TESTCASE=$(PFM)/$(VARIETY)/%; \
243 echo "\n\n-- Running $$TESTCASE at $$(date) --" >> $$OUTPUT && \
244 echo "Running $$TESTCASE" && \
245 $$TESTCASE >> $$OUTPUT) &&) true
239 246
240# These convenience targets allow one to type "make foo" to build target 247# These convenience targets allow one to type "make foo" to build target
241# foo in selected varieties (or none, for the latter rule). 248# foo in selected varieties (or none, for the latter rule).
diff --git a/mps/code/eventsql.c b/mps/code/eventsql.c
index 1fdafe4624e..ec869a784cd 100644
--- a/mps/code/eventsql.c
+++ b/mps/code/eventsql.c
@@ -134,7 +134,7 @@ static void evlog(unsigned int level, const char *format, ...)
134static void error(const char *format, ...) 134static void error(const char *format, ...)
135{ 135{
136 va_list args; 136 va_list args;
137 fprintf(stderr, "Fatal error: "); 137 fprintf(stderr, "Fatal error: ");
138 va_start(args, format); 138 va_start(args, format);
139 vlog(LOG_ALWAYS, format, args); 139 vlog(LOG_ALWAYS, format, args);
140 va_end(args); 140 va_end(args);
@@ -964,7 +964,7 @@ int main(int argc, char *argv[])
964 964
965/* COPYRIGHT AND LICENSE 965/* COPYRIGHT AND LICENSE
966 * 966 *
967 * Copyright (C) 2012 Ravenbrook Limited <http://www.ravenbrook.com/>. 967 * Copyright (c) 2012-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
968 * All rights reserved. This is an open source license. Contact 968 * All rights reserved. This is an open source license. Contact
969 * Ravenbrook for commercial licensing options. 969 * Ravenbrook for commercial licensing options.
970 * 970 *
diff --git a/mps/code/exposet0.c b/mps/code/exposet0.c
index f5a0b1e9e49..6cbf57488d8 100644
--- a/mps/code/exposet0.c
+++ b/mps/code/exposet0.c
@@ -1,7 +1,7 @@
1/* exposet0.c: ARENA EXPOSE TEST 1/* exposet0.c: ARENA EXPOSE TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001,2003 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 * 6 *
7 * The primary purpose of this test is to test that mps_arena_expose does 7 * The primary purpose of this test is to test that mps_arena_expose does
@@ -248,7 +248,7 @@ static void *test(void *arg, size_t s)
248 return NULL; 248 return NULL;
249} 249}
250 250
251int main(int argc, char **argv) 251int main(int argc, char *argv[])
252{ 252{
253 mps_arena_t arena; 253 mps_arena_t arena;
254 mps_thr_t thread; 254 mps_thr_t thread;
@@ -266,15 +266,14 @@ int main(int argc, char **argv)
266 report(arena); 266 report(arena);
267 mps_arena_destroy(arena); 267 mps_arena_destroy(arena);
268 268
269 fflush(stdout); /* synchronize */ 269 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
270 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
271 return 0; 270 return 0;
272} 271}
273 272
274 273
275/* C. COPYRIGHT AND LICENSE 274/* C. COPYRIGHT AND LICENSE
276 * 275 *
277 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 276 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
278 * All rights reserved. This is an open source license. Contact 277 * All rights reserved. This is an open source license. Contact
279 * Ravenbrook for commercial licensing options. 278 * Ravenbrook for commercial licensing options.
280 * 279 *
diff --git a/mps/code/expt825.c b/mps/code/expt825.c
index 588716f49de..26e99aa63d8 100644
--- a/mps/code/expt825.c
+++ b/mps/code/expt825.c
@@ -1,7 +1,7 @@
1/* expt825.c: Test for bug described in job000825 1/* expt825.c: Test for bug described in job000825
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001,2003 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 * 6 *
7 * DESIGN 7 * DESIGN
@@ -254,7 +254,7 @@ static void *test(void *arg, size_t s)
254} 254}
255 255
256 256
257int main(void) 257int main(int argc, char *argv[])
258{ 258{
259 mps_arena_t arena; 259 mps_arena_t arena;
260 mps_thr_t thread; 260 mps_thr_t thread;
@@ -267,14 +267,14 @@ int main(void)
267 mps_thread_dereg(thread); 267 mps_thread_dereg(thread);
268 mps_arena_destroy(arena); 268 mps_arena_destroy(arena);
269 269
270 fflush(stdout); /* synchronize */ 270 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
271 return 0; 271 return 0;
272} 272}
273 273
274 274
275/* C. COPYRIGHT AND LICENSE 275/* C. COPYRIGHT AND LICENSE
276 * 276 *
277 * Copyright (C) 2001-2003 Ravenbrook Limited <http://www.ravenbrook.com/>. 277 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
278 * All rights reserved. This is an open source license. Contact 278 * All rights reserved. This is an open source license. Contact
279 * Ravenbrook for commercial licensing options. 279 * Ravenbrook for commercial licensing options.
280 * 280 *
diff --git a/mps/code/finalcv.c b/mps/code/finalcv.c
index 79a38dbbfb3..8380363350b 100644
--- a/mps/code/finalcv.c
+++ b/mps/code/finalcv.c
@@ -1,7 +1,7 @@
1/* finalcv.c: FINALIZATION COVERAGE TEST 1/* finalcv.c: FINALIZATION COVERAGE TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 * 6 *
7 * DESIGN 7 * DESIGN
@@ -210,7 +210,7 @@ static void *test(void *arg, size_t s)
210} 210}
211 211
212 212
213int main(int argc, char **argv) 213int main(int argc, char *argv[])
214{ 214{
215 mps_arena_t arena; 215 mps_arena_t arena;
216 mps_thr_t thread; 216 mps_thr_t thread;
@@ -225,15 +225,14 @@ int main(int argc, char **argv)
225 mps_thread_dereg(thread); 225 mps_thread_dereg(thread);
226 mps_arena_destroy(arena); 226 mps_arena_destroy(arena);
227 227
228 fflush(stdout); /* synchronize */ 228 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
229 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
230 return 0; 229 return 0;
231} 230}
232 231
233 232
234/* C. COPYRIGHT AND LICENSE 233/* C. COPYRIGHT AND LICENSE
235 * 234 *
236 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 235 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
237 * All rights reserved. This is an open source license. Contact 236 * All rights reserved. This is an open source license. Contact
238 * Ravenbrook for commercial licensing options. 237 * Ravenbrook for commercial licensing options.
239 * 238 *
diff --git a/mps/code/finaltest.c b/mps/code/finaltest.c
index 069a737d708..53cb093cf15 100644
--- a/mps/code/finaltest.c
+++ b/mps/code/finaltest.c
@@ -1,7 +1,7 @@
1/* finaltest.c: LARGE-SCALE FINALIZATION TEST 1/* finaltest.c: LARGE-SCALE FINALIZATION TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 * 6 *
7 * DESIGN 7 * DESIGN
@@ -239,7 +239,7 @@ static void *test(void *arg, size_t s)
239} 239}
240 240
241 241
242int main(void) 242int main(int argc, char *argv[])
243{ 243{
244 mps_arena_t arena; 244 mps_arena_t arena;
245 mps_thr_t thread; 245 mps_thr_t thread;
@@ -252,14 +252,14 @@ int main(void)
252 mps_thread_dereg(thread); 252 mps_thread_dereg(thread);
253 mps_arena_destroy(arena); 253 mps_arena_destroy(arena);
254 254
255 fflush(stdout); /* synchronize */ 255 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
256 return 0; 256 return 0;
257} 257}
258 258
259 259
260/* C. COPYRIGHT AND LICENSE 260/* C. COPYRIGHT AND LICENSE
261 * 261 *
262 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 262 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
263 * All rights reserved. This is an open source license. Contact 263 * All rights reserved. This is an open source license. Contact
264 * Ravenbrook for commercial licensing options. 264 * Ravenbrook for commercial licensing options.
265 * 265 *
diff --git a/mps/code/libcbt.c b/mps/code/libcbt.c
index 7e13734ecf8..7c9897ec2e4 100644
--- a/mps/code/libcbt.c
+++ b/mps/code/libcbt.c
@@ -19,17 +19,15 @@
19void libcbt_assert_fail(const char *); 19void libcbt_assert_fail(const char *);
20mps_clock_t libcbt_clock(void); 20mps_clock_t libcbt_clock(void);
21 21
22int main(void) 22int main(int argc, char *argv[])
23{ 23{
24 int res; 24 int res;
25 int defects = 0;
26 mps_arena_t arena; 25 mps_arena_t arena;
27 26
28 res = mps_lib_callback_register("not a callback", (void(*)(void))0); 27 res = mps_lib_callback_register("not a callback", (void(*)(void))0);
29 if(MPS_RES_OK == res) { 28 if(MPS_RES_OK == res) {
30 printf("mps_lib_callback_register claims to successfully register\n" 29 error("mps_lib_callback_register claims to successfully register\n"
31 "an interface that does not exist.\n"); 30 "an interface that does not exist.\n");
32 ++ defects;
33 } 31 }
34 die(mps_lib_callback_register("mps_lib_assert_fail", 32 die(mps_lib_callback_register("mps_lib_assert_fail",
35 (void(*)(void))libcbt_assert_fail), 33 (void(*)(void))libcbt_assert_fail),
@@ -44,11 +42,8 @@ int main(void)
44 "register clock"); 42 "register clock");
45 die(mps_arena_create(&arena, mps_arena_class_vm(), (size_t)1000*1000), 43 die(mps_arena_create(&arena, mps_arena_class_vm(), (size_t)1000*1000),
46 "mps_arena_create"); 44 "mps_arena_create");
47 if(defects) { 45
48 printf("Conclusion: Defects detected.\n"); 46 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
49 } else {
50 printf("Conclusion: Failed to find any defects.\n");
51 }
52 return 0; 47 return 0;
53} 48}
54 49
@@ -71,7 +66,7 @@ mps_clock_t libcbt_clock(void)
71 66
72/* C. COPYRIGHT AND LICENSE 67/* C. COPYRIGHT AND LICENSE
73 * 68 *
74 * Copyright (C) 2005 Ravenbrook Limited <http://www.ravenbrook.com/>. 69 * Copyright (c) 2005-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
75 * All rights reserved. This is an open source license. Contact 70 * All rights reserved. This is an open source license. Contact
76 * Ravenbrook for commercial licensing options. 71 * Ravenbrook for commercial licensing options.
77 * 72 *
diff --git a/mps/code/locbwcss.c b/mps/code/locbwcss.c
index 766b427ce30..221d1cca856 100644
--- a/mps/code/locbwcss.c
+++ b/mps/code/locbwcss.c
@@ -1,7 +1,7 @@
1/* locbwcss.c: LOCUS BACKWARDS COMPATIBILITY STRESS TEST 1/* locbwcss.c: LOCUS BACKWARDS COMPATIBILITY STRESS TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 */ 5 */
6 6
7#include "mpscmvff.h" 7#include "mpscmvff.h"
@@ -176,9 +176,9 @@ static void testInArena(mps_arena_t arena)
176 reportResults(histat, "the high MVFF pool"); 176 reportResults(histat, "the high MVFF pool");
177 177
178 if (lostat->max > histat->min) { 178 if (lostat->max > histat->min) {
179 printf("\nFOUND PROBLEM - low range overlaps high\n"); 179 error("\nFOUND PROBLEM - low range overlaps high\n");
180 } else if (lostat->ncCount != 0 || histat->ncCount != 0) { 180 } else if (lostat->ncCount != 0 || histat->ncCount != 0) {
181 printf("\nFOUND POSSIBLE PROBLEM - some non-contiguous allocations\n"); 181 error("\nFOUND POSSIBLE PROBLEM - some non-contiguous allocations\n");
182 } else { 182 } else {
183 printf("\nNo problems detected.\n"); 183 printf("\nNo problems detected.\n");
184 } 184 }
@@ -188,7 +188,7 @@ static void testInArena(mps_arena_t arena)
188} 188}
189 189
190 190
191int main(int argc, char **argv) 191int main(int argc, char *argv[])
192{ 192{
193 mps_arena_t arena; 193 mps_arena_t arena;
194 194
@@ -201,13 +201,14 @@ int main(int argc, char **argv)
201 201
202 mps_arena_destroy(arena); 202 mps_arena_destroy(arena);
203 203
204 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
204 return 0; 205 return 0;
205} 206}
206 207
207 208
208/* C. COPYRIGHT AND LICENSE 209/* C. COPYRIGHT AND LICENSE
209 * 210 *
210 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 211 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
211 * All rights reserved. This is an open source license. Contact 212 * All rights reserved. This is an open source license. Contact
212 * Ravenbrook for commercial licensing options. 213 * Ravenbrook for commercial licensing options.
213 * 214 *
diff --git a/mps/code/lockcov.c b/mps/code/lockcov.c
index 159a93e95ce..3011897c066 100644
--- a/mps/code/lockcov.c
+++ b/mps/code/lockcov.c
@@ -1,7 +1,7 @@
1/* lockcov.c: LOCK COVERAGE TEST 1/* lockcov.c: LOCK COVERAGE TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 */ 5 */
6 6
7#include "mpm.h" 7#include "mpm.h"
@@ -9,7 +9,7 @@
9#include <stdlib.h> /* for malloc & free */ 9#include <stdlib.h> /* for malloc & free */
10 10
11 11
12int main(void) 12int main(int argc, char *argv[])
13{ 13{
14 Lock a = malloc(LockSize()); 14 Lock a = malloc(LockSize());
15 Lock b = malloc(LockSize()); 15 Lock b = malloc(LockSize());
@@ -44,15 +44,14 @@ int main(void)
44 free(a); 44 free(a);
45 free(b); 45 free(b);
46 46
47 fflush(stdout); /* synchronize */ 47 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
48 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
49 return 0; 48 return 0;
50} 49}
51 50
52 51
53/* C. COPYRIGHT AND LICENSE 52/* C. COPYRIGHT AND LICENSE
54 * 53 *
55 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 54 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
56 * All rights reserved. This is an open source license. Contact 55 * All rights reserved. This is an open source license. Contact
57 * Ravenbrook for commercial licensing options. 56 * Ravenbrook for commercial licensing options.
58 * 57 *
diff --git a/mps/code/lockutw3.c b/mps/code/lockutw3.c
index 2565ec60796..b135f0e1d43 100644
--- a/mps/code/lockutw3.c
+++ b/mps/code/lockutw3.c
@@ -1,7 +1,7 @@
1/* lockutw3.c: LOCK UTILIZATION TEST 1/* lockutw3.c: LOCK UTILIZATION TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 */ 5 */
6 6
7#include "mpm.h" 7#include "mpm.h"
@@ -64,7 +64,7 @@ DWORD WINAPI thread0(void *p)
64} 64}
65 65
66 66
67int main(void) 67int main(int argc, char *argv[])
68{ 68{
69 DWORD id; 69 DWORD id;
70 HANDLE t[10]; 70 HANDLE t[10];
@@ -87,15 +87,14 @@ int main(void)
87 87
88 LockFinish(lock); 88 LockFinish(lock);
89 89
90 fflush(stdout); /* synchronize */ 90 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
91 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
92 return 0; 91 return 0;
93} 92}
94 93
95 94
96/* C. COPYRIGHT AND LICENSE 95/* C. COPYRIGHT AND LICENSE
97 * 96 *
98 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 97 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
99 * All rights reserved. This is an open source license. Contact 98 * All rights reserved. This is an open source license. Contact
100 * Ravenbrook for commercial licensing options. 99 * Ravenbrook for commercial licensing options.
101 * 100 *
diff --git a/mps/code/locusss.c b/mps/code/locusss.c
index f3828404c0b..81053608fbf 100644
--- a/mps/code/locusss.c
+++ b/mps/code/locusss.c
@@ -1,7 +1,7 @@
1/* locusss.c: LOCUS STRESS TEST 1/* locusss.c: LOCUS STRESS TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 */ 5 */
6 6
7#include "mpscmvff.h" 7#include "mpscmvff.h"
@@ -229,7 +229,7 @@ static void runArenaTest(size_t size,
229} 229}
230 230
231 231
232int main(int argc, char **argv) 232int main(int argc, char *argv[])
233{ 233{
234 234
235 randomize(argc, argv); 235 randomize(argc, argv);
@@ -249,7 +249,7 @@ int main(int argc, char **argv)
249 249
250/* C. COPYRIGHT AND LICENSE 250/* C. COPYRIGHT AND LICENSE
251 * 251 *
252 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 252 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
253 * All rights reserved. This is an open source license. Contact 253 * All rights reserved. This is an open source license. Contact
254 * Ravenbrook for commercial licensing options. 254 * Ravenbrook for commercial licensing options.
255 * 255 *
diff --git a/mps/code/locv.c b/mps/code/locv.c
index 76260ed526b..c5ef3d81044 100644
--- a/mps/code/locv.c
+++ b/mps/code/locv.c
@@ -1,7 +1,7 @@
1/* locv.c: LEAF OBJECT POOL CLASS COVERAGE TEST 1/* locv.c: LEAF OBJECT POOL CLASS COVERAGE TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * 5 *
6 * This is (not much of) a coverage test for the Leaf Object 6 * This is (not much of) a coverage test for the Leaf Object
7 * pool (PoolClassLO). 7 * pool (PoolClassLO).
@@ -39,7 +39,7 @@ static mps_fmt_A_s locv_fmt =
39static mps_addr_t roots[4]; 39static mps_addr_t roots[4];
40 40
41 41
42int main(void) 42int main(int argc, char *argv[])
43{ 43{
44 mps_arena_t arena; 44 mps_arena_t arena;
45 mps_pool_t pool; 45 mps_pool_t pool;
@@ -92,8 +92,7 @@ int main(void)
92 mps_root_destroy(root); 92 mps_root_destroy(root);
93 mps_arena_destroy(arena); 93 mps_arena_destroy(arena);
94 94
95 fflush(stdout); /* synchronize */ 95 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
96 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
97 return 0; 96 return 0;
98} 97}
99 98
@@ -168,7 +167,7 @@ static void stepper(mps_addr_t addr, mps_fmt_t fmt, mps_pool_t pool,
168 167
169/* C. COPYRIGHT AND LICENSE 168/* C. COPYRIGHT AND LICENSE
170 * 169 *
171 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 170 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
172 * All rights reserved. This is an open source license. Contact 171 * All rights reserved. This is an open source license. Contact
173 * Ravenbrook for commercial licensing options. 172 * Ravenbrook for commercial licensing options.
174 * 173 *
diff --git a/mps/code/messtest.c b/mps/code/messtest.c
index 2bb608481e0..de60f93fdec 100644
--- a/mps/code/messtest.c
+++ b/mps/code/messtest.c
@@ -1,7 +1,7 @@
1/* messtest.c: MESSAGE TEST 1/* messtest.c: MESSAGE TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001-2003 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 */ 5 */
6 6
7#include "mpm.h" 7#include "mpm.h"
@@ -268,14 +268,14 @@ extern int main(int argc, char *argv[])
268 testInterleaving(arena); 268 testInterleaving(arena);
269 testDisabling(arena); 269 testDisabling(arena);
270 270
271 printf("\nNo problems detected.\n"); 271 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
272 return 0; 272 return 0;
273} 273}
274 274
275 275
276/* C. COPYRIGHT AND LICENSE 276/* C. COPYRIGHT AND LICENSE
277 * 277 *
278 * Copyright (C) 2001-2003 Ravenbrook Limited <http://www.ravenbrook.com/>. 278 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
279 * All rights reserved. This is an open source license. Contact 279 * All rights reserved. This is an open source license. Contact
280 * Ravenbrook for commercial licensing options. 280 * Ravenbrook for commercial licensing options.
281 * 281 *
diff --git a/mps/code/mpmss.c b/mps/code/mpmss.c
index e98961986cf..4cc85712946 100644
--- a/mps/code/mpmss.c
+++ b/mps/code/mpmss.c
@@ -1,7 +1,7 @@
1/* mpmss.c: MPM STRESS TEST 1/* mpmss.c: MPM STRESS TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 */ 6 */
7 7
@@ -180,7 +180,7 @@ static int testInArena(mps_arena_t arena, mps_pool_debug_option_s *options)
180} 180}
181 181
182 182
183int main(int argc, char **argv) 183int main(int argc, char *argv[])
184{ 184{
185 mps_arena_t arena; 185 mps_arena_t arena;
186 mps_pool_debug_option_s *bothOptions; 186 mps_pool_debug_option_s *bothOptions;
@@ -199,15 +199,14 @@ int main(int argc, char **argv)
199 testInArena(arena, &fenceOptions); 199 testInArena(arena, &fenceOptions);
200 mps_arena_destroy(arena); 200 mps_arena_destroy(arena);
201 201
202 fflush(stdout); /* synchronize */ 202 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
203 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
204 return 0; 203 return 0;
205} 204}
206 205
207 206
208/* C. COPYRIGHT AND LICENSE 207/* C. COPYRIGHT AND LICENSE
209 * 208 *
210 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 209 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
211 * All rights reserved. This is an open source license. Contact 210 * All rights reserved. This is an open source license. Contact
212 * Ravenbrook for commercial licensing options. 211 * Ravenbrook for commercial licensing options.
213 * 212 *
diff --git a/mps/code/mpsicv.c b/mps/code/mpsicv.c
index 0c003442aff..a734d91ff20 100644
--- a/mps/code/mpsicv.c
+++ b/mps/code/mpsicv.c
@@ -1,7 +1,7 @@
1/* mpsicv.c: MPSI COVERAGE TEST 1/* mpsicv.c: MPSI COVERAGE TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (c) 2002 Global Graphics Software. 5 * Portions copyright (c) 2002 Global Graphics Software.
6 */ 6 */
7 7
@@ -572,7 +572,7 @@ static void *test(void *arg, size_t s)
572#define TEST_ARENA_SIZE ((size_t)16<<20) 572#define TEST_ARENA_SIZE ((size_t)16<<20)
573 573
574 574
575int main(int argc, char **argv) 575int main(int argc, char *argv[])
576{ 576{
577 mps_arena_t arena; 577 mps_arena_t arena;
578 mps_thr_t thread; 578 mps_thr_t thread;
@@ -598,15 +598,14 @@ int main(int argc, char **argv)
598 mps_thread_dereg(thread); 598 mps_thread_dereg(thread);
599 mps_arena_destroy(arena); 599 mps_arena_destroy(arena);
600 600
601 fflush(stdout); /* synchronize */ 601 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
602 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
603 return 0; 602 return 0;
604} 603}
605 604
606 605
607/* C. COPYRIGHT AND LICENSE 606/* C. COPYRIGHT AND LICENSE
608 * 607 *
609 * Copyright (C) 2001-2002, 2008 Ravenbrook Limited <http://www.ravenbrook.com/>. 608 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
610 * All rights reserved. This is an open source license. Contact 609 * All rights reserved. This is an open source license. Contact
611 * Ravenbrook for commercial licensing options. 610 * Ravenbrook for commercial licensing options.
612 * 611 *
diff --git a/mps/code/mv2test.c b/mps/code/mv2test.c
index 5568f9dc713..649719c5de3 100644
--- a/mps/code/mv2test.c
+++ b/mps/code/mv2test.c
@@ -1,7 +1,7 @@
1/* mv2test.c: POOLMVT STRESS TEST 1/* mv2test.c: POOLMVT STRESS TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 */ 5 */
6 6
7#include <stdio.h> 7#include <stdio.h>
@@ -315,18 +315,19 @@ static void stress_with_arena_class(mps_arena_class_t aclass)
315} 315}
316 316
317 317
318int main(void) 318int main(int argc, char *argv[])
319{ 319{
320 stress_with_arena_class(mps_arena_class_vm()); 320 stress_with_arena_class(mps_arena_class_vm());
321 stress_with_arena_class(mps_arena_class_vmnz()); 321 stress_with_arena_class(mps_arena_class_vmnz());
322 322
323 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
323 return 0; 324 return 0;
324} 325}
325 326
326 327
327/* C. COPYRIGHT AND LICENSE 328/* C. COPYRIGHT AND LICENSE
328 * 329 *
329 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 330 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
330 * All rights reserved. This is an open source license. Contact 331 * All rights reserved. This is an open source license. Contact
331 * Ravenbrook for commercial licensing options. 332 * Ravenbrook for commercial licensing options.
332 * 333 *
diff --git a/mps/code/poolncv.c b/mps/code/poolncv.c
index 765664917af..ec4c3471ae8 100644
--- a/mps/code/poolncv.c
+++ b/mps/code/poolncv.c
@@ -10,9 +10,8 @@
10#include "testlib.h" 10#include "testlib.h"
11 11
12 12
13static Bool testit(ArenaClass class, ...) 13static void testit(ArenaClass class, ...)
14{ 14{
15 Bool eflag = FALSE;
16 Arena arena; 15 Arena arena;
17 Pool pool; 16 Pool pool;
18 Res res; 17 Res res;
@@ -26,32 +25,25 @@ static Bool testit(ArenaClass class, ...)
26 die(PoolCreate(&pool, arena, PoolClassN()), "PoolNCreate"); 25 die(PoolCreate(&pool, arena, PoolClassN()), "PoolNCreate");
27 res = PoolAlloc(&p, pool, 1, /* withReservoirPermit */ FALSE); 26 res = PoolAlloc(&p, pool, 1, /* withReservoirPermit */ FALSE);
28 if (res == ResOK) { 27 if (res == ResOK) {
29 fprintf(stderr, 28 error("Error: Unexpectedly succeeded in"
30 "Error: Unexpectedly succeeded in" 29 "allocating block from PoolN\n");
31 "allocating block from PoolN\n");
32 eflag = TRUE;
33 } 30 }
34 PoolDestroy(pool); 31 PoolDestroy(pool);
35 ArenaDestroy(arena); 32 ArenaDestroy(arena);
36
37 return eflag;
38} 33}
39 34
40 35
41int main(void) 36int main(int argc, char *argv[])
42{ 37{
43 if (testit((ArenaClass)mps_arena_class_vm(), (Size)600000)) { 38 testit((ArenaClass)mps_arena_class_vm(), (Size)600000);
44 fprintf(stderr, "Conclusion: Defects found.\n"); 39 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
45 } else {
46 fprintf(stderr, "Conclusion: Failed to find any defects.\n");
47 }
48 return 0; 40 return 0;
49} 41}
50 42
51 43
52/* C. COPYRIGHT AND LICENSE 44/* C. COPYRIGHT AND LICENSE
53 * 45 *
54 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 46 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
55 * All rights reserved. This is an open source license. Contact 47 * All rights reserved. This is an open source license. Contact
56 * Ravenbrook for commercial licensing options. 48 * Ravenbrook for commercial licensing options.
57 * 49 *
diff --git a/mps/code/qs.c b/mps/code/qs.c
index 8d5c011701c..2adc49ec4b9 100644
--- a/mps/code/qs.c
+++ b/mps/code/qs.c
@@ -510,7 +510,7 @@ static void copy(mps_addr_t object, mps_addr_t to)
510} 510}
511 511
512 512
513int main(int argc, char **argv) 513int main(int argc, char *argv[])
514{ 514{
515 void *r; 515 void *r;
516 516
@@ -521,15 +521,14 @@ int main(int argc, char **argv)
521 mps_tramp(&r, &go, NULL, 0); 521 mps_tramp(&r, &go, NULL, 0);
522 mps_arena_destroy(arena); 522 mps_arena_destroy(arena);
523 523
524 fflush(stdout); /* synchronize */ 524 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
525 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
526 return 0; 525 return 0;
527} 526}
528 527
529 528
530/* C. COPYRIGHT AND LICENSE 529/* C. COPYRIGHT AND LICENSE
531 * 530 *
532 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 531 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
533 * All rights reserved. This is an open source license. Contact 532 * All rights reserved. This is an open source license. Contact
534 * Ravenbrook for commercial licensing options. 533 * Ravenbrook for commercial licensing options.
535 * 534 *
diff --git a/mps/code/sacss.c b/mps/code/sacss.c
index 7fe5c368b3c..6501a12e952 100644
--- a/mps/code/sacss.c
+++ b/mps/code/sacss.c
@@ -1,7 +1,7 @@
1/* sacss.c: SAC MANUAL ALLOC STRESS TEST 1/* sacss.c: SAC MANUAL ALLOC STRESS TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 */ 6 */
7 7
@@ -186,7 +186,7 @@ static int testInArena(mps_arena_t arena)
186} 186}
187 187
188 188
189int main(int argc, char **argv) 189int main(int argc, char *argv[])
190{ 190{
191 mps_arena_t arena; 191 mps_arena_t arena;
192 192
@@ -197,15 +197,14 @@ int main(int argc, char **argv)
197 testInArena(arena); 197 testInArena(arena);
198 mps_arena_destroy(arena); 198 mps_arena_destroy(arena);
199 199
200 fflush(stdout); /* synchronize */ 200 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
201 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
202 return 0; 201 return 0;
203} 202}
204 203
205 204
206/* C. COPYRIGHT AND LICENSE 205/* C. COPYRIGHT AND LICENSE
207 * 206 *
208 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 207 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
209 * All rights reserved. This is an open source license. Contact 208 * All rights reserved. This is an open source license. Contact
210 * Ravenbrook for commercial licensing options. 209 * Ravenbrook for commercial licensing options.
211 * 210 *
diff --git a/mps/code/segsmss.c b/mps/code/segsmss.c
index 8f7c6095308..4741b33f89b 100644
--- a/mps/code/segsmss.c
+++ b/mps/code/segsmss.c
@@ -1,7 +1,7 @@
1/* segsmss.c: Segment splitting and merging stress test 1/* segsmss.c: Segment splitting and merging stress test
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (c) 2002 Global Graphics Software. 5 * Portions copyright (c) 2002 Global Graphics Software.
6 * 6 *
7 * .design: Adapted from amsss.c (because AMS already supports 7 * .design: Adapted from amsss.c (because AMS already supports
@@ -841,7 +841,7 @@ static void *test(void *arg, size_t s)
841} 841}
842 842
843 843
844int main(int argc, char **argv) 844int main(int argc, char *argv[])
845{ 845{
846 mps_arena_t arena; 846 mps_arena_t arena;
847 mps_thr_t thread; 847 mps_thr_t thread;
@@ -856,15 +856,14 @@ int main(int argc, char **argv)
856 mps_thread_dereg(thread); 856 mps_thread_dereg(thread);
857 mps_arena_destroy(arena); 857 mps_arena_destroy(arena);
858 858
859 fflush(stdout); /* synchronize */ 859 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
860 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
861 return 0; 860 return 0;
862} 861}
863 862
864 863
865/* C. COPYRIGHT AND LICENSE 864/* C. COPYRIGHT AND LICENSE
866 * 865 *
867 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 866 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
868 * All rights reserved. This is an open source license. Contact 867 * All rights reserved. This is an open source license. Contact
869 * Ravenbrook for commercial licensing options. 868 * Ravenbrook for commercial licensing options.
870 * 869 *
diff --git a/mps/code/steptest.c b/mps/code/steptest.c
index b4f957af79a..1905a141037 100644
--- a/mps/code/steptest.c
+++ b/mps/code/steptest.c
@@ -1,7 +1,7 @@
1/* steptest.c: TEST FOR ARENA STEPPING 1/* steptest.c: TEST FOR ARENA STEPPING
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (C) 1998 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 1998-2013 Ravenbrook Limited. See end of file for license.
5 * 5 *
6 * Loosely based on <code/amcss.c>. 6 * Loosely based on <code/amcss.c>.
7 */ 7 */
@@ -485,7 +485,7 @@ static void *test(void *arg, size_t s)
485 return NULL; 485 return NULL;
486} 486}
487 487
488int main(int argc, char **argv) 488int main(int argc, char *argv[])
489{ 489{
490 prepare_clock(); 490 prepare_clock();
491 491
@@ -507,15 +507,14 @@ int main(int argc, char **argv)
507 ++ test_number; 507 ++ test_number;
508 } 508 }
509 509
510 fflush(stdout); /* synchronize */ 510 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
511 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
512 return 0; 511 return 0;
513} 512}
514 513
515 514
516/* C. COPYRIGHT AND LICENSE 515/* C. COPYRIGHT AND LICENSE
517 * 516 *
518 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 517 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
519 * All rights reserved. This is an open source license. Contact 518 * All rights reserved. This is an open source license. Contact
520 * Ravenbrook for commercial licensing options. 519 * Ravenbrook for commercial licensing options.
521 * 520 *
diff --git a/mps/code/testlib.c b/mps/code/testlib.c
index 06d0641c688..be7284ea3fa 100644
--- a/mps/code/testlib.c
+++ b/mps/code/testlib.c
@@ -1,7 +1,7 @@
1/* testlib.c: TEST LIBRARY 1/* testlib.c: TEST LIBRARY
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 * 6 *
7 * .purpose: A library of functions that may be of use to unit tests. 7 * .purpose: A library of functions that may be of use to unit tests.
@@ -252,7 +252,7 @@ mps_addr_t rnd_addr(void)
252 * (New from 2010-03-22, changelist 170093) 252 * (New from 2010-03-22, changelist 170093)
253 */ 253 */
254 254
255void randomize(int argc, char **argv) 255void randomize(int argc, char *argv[])
256{ 256{
257 int i; 257 int i;
258 int n; 258 int n;
@@ -262,7 +262,8 @@ void randomize(int argc, char **argv)
262 if (argc > 1) { 262 if (argc > 1) {
263 n = sscanf(argv[1], "%lu", &seed0); 263 n = sscanf(argv[1], "%lu", &seed0);
264 Insist(n == 1); 264 Insist(n == 1);
265 printf("randomize(): resetting initial state (v3) to: %lu.\n", seed0); 265 printf("%s: randomize(): resetting initial state (v3) to: %lu.\n",
266 argv[0], seed0);
266 rnd_state_set(seed0); 267 rnd_state_set(seed0);
267 } else { 268 } else {
268 /* time_t uses an arbitrary encoding, but hopefully the low order */ 269 /* time_t uses an arbitrary encoding, but hopefully the low order */
@@ -288,7 +289,8 @@ void randomize(int argc, char **argv)
288 } 289 }
289 290
290 seed0 = rnd_state(); 291 seed0 = rnd_state();
291 printf("randomize(): choosing initial state (v3): %lu.\n", seed0); 292 printf("%s: randomize(): choosing initial state (v3): %lu.\n",
293 argv[0], seed0);
292 rnd_state_set(seed0); 294 rnd_state_set(seed0);
293 } 295 }
294} 296}
@@ -386,7 +388,7 @@ void cdie(int res, const char *s)
386 388
387/* C. COPYRIGHT AND LICENSE 389/* C. COPYRIGHT AND LICENSE
388 * 390 *
389 * Copyright (C) 2001-2002, 2008 Ravenbrook Limited <http://www.ravenbrook.com/>. 391 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
390 * All rights reserved. This is an open source license. Contact 392 * All rights reserved. This is an open source license. Contact
391 * Ravenbrook for commercial licensing options. 393 * Ravenbrook for commercial licensing options.
392 * 394 *
diff --git a/mps/code/testlib.h b/mps/code/testlib.h
index e3a11c34139..cc4bcce8006 100644
--- a/mps/code/testlib.h
+++ b/mps/code/testlib.h
@@ -1,7 +1,7 @@
1/* testlib.h: TEST LIBRARY INTERFACE 1/* testlib.h: TEST LIBRARY INTERFACE
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 * 6 *
7 * .purpose: A library of functions that may be of use to unit tests. 7 * .purpose: A library of functions that may be of use to unit tests.
@@ -212,7 +212,7 @@ extern mps_addr_t rnd_addr(void);
212 * line argument) and initializes the generator to the same state. 212 * line argument) and initializes the generator to the same state.
213 */ 213 */
214 214
215extern void randomize(int argc, char **argv); 215extern void randomize(int argc, char *argv[]);
216 216
217 217
218#endif /* testlib_h */ 218#endif /* testlib_h */
diff --git a/mps/code/walkt0.c b/mps/code/walkt0.c
index f4618fd420c..83170ec4929 100644
--- a/mps/code/walkt0.c
+++ b/mps/code/walkt0.c
@@ -1,7 +1,7 @@
1/* walkt0.c: WALK TEST 0 1/* walkt0.c: WALK TEST 0
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (C) 1998,2003 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 1998-2013 Ravenbrook Limited. See end of file for license.
5 * 5 *
6 * Loosely based on <code/steptest.c>. 6 * Loosely based on <code/steptest.c>.
7 */ 7 */
@@ -194,7 +194,7 @@ static void *test(void *arg, size_t s)
194 return NULL; 194 return NULL;
195} 195}
196 196
197int main(int argc, char **argv) 197int main(int argc, char *argv[])
198{ 198{
199 mps_arena_t arena; 199 mps_arena_t arena;
200 mps_thr_t thread; 200 mps_thr_t thread;
@@ -210,15 +210,14 @@ int main(int argc, char **argv)
210 mps_thread_dereg(thread); 210 mps_thread_dereg(thread);
211 mps_arena_destroy(arena); 211 mps_arena_destroy(arena);
212 212
213 fflush(stdout); /* synchronize */ 213 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
214 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
215 return 0; 214 return 0;
216} 215}
217 216
218 217
219/* C. COPYRIGHT AND LICENSE 218/* C. COPYRIGHT AND LICENSE
220 * 219 *
221 * Copyright (C) 2001-2003 Ravenbrook Limited <http://www.ravenbrook.com/>. 220 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
222 * All rights reserved. This is an open source license. Contact 221 * All rights reserved. This is an open source license. Contact
223 * Ravenbrook for commercial licensing options. 222 * Ravenbrook for commercial licensing options.
224 * 223 *
diff --git a/mps/code/zcoll.c b/mps/code/zcoll.c
index be698733a73..ad2f272ceb4 100644
--- a/mps/code/zcoll.c
+++ b/mps/code/zcoll.c
@@ -835,7 +835,7 @@ static void testscriptA(const char *script)
835/* main -- runs various test scripts 835/* main -- runs various test scripts
836 * 836 *
837 */ 837 */
838int main(int argc, char **argv) 838int main(int argc, char *argv[])
839{ 839{
840 randomize(argc, argv); 840 randomize(argc, argv);
841 841
@@ -929,15 +929,14 @@ int main(int argc, char **argv)
929 testscriptA("Arena(size 16777216), Katalog(), Collect."); 929 testscriptA("Arena(size 16777216), Katalog(), Collect.");
930 */ 930 */
931 931
932 fflush(stdout); /* synchronize */ 932 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
933 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
934 return 0; 933 return 0;
935} 934}
936 935
937 936
938/* C. COPYRIGHT AND LICENSE 937/* C. COPYRIGHT AND LICENSE
939 * 938 *
940 * Copyright (C) 2001-2002, 2008 Ravenbrook Limited <http://www.ravenbrook.com/>. 939 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
941 * All rights reserved. This is an open source license. Contact 940 * All rights reserved. This is an open source license. Contact
942 * Ravenbrook for commercial licensing options. 941 * Ravenbrook for commercial licensing options.
943 * 942 *
diff --git a/mps/code/zmess.c b/mps/code/zmess.c
index 6d2840f86a9..2f169b57e38 100644
--- a/mps/code/zmess.c
+++ b/mps/code/zmess.c
@@ -484,7 +484,7 @@ Bool TIMCA_remote(void)
484/* main -- runs various test scripts 484/* main -- runs various test scripts
485 * 485 *
486 */ 486 */
487int main(int argc, char **argv) 487int main(int argc, char *argv[])
488{ 488{
489 489
490 randomize(argc, argv); 490 randomize(argc, argv);
@@ -563,15 +563,14 @@ int main(int argc, char **argv)
563 TIMCA_setup(""); /* must reset it! */ 563 TIMCA_setup(""); /* must reset it! */
564 } 564 }
565 565
566 fflush(stdout); /* synchronize */ 566 printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
567 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");
568 return 0; 567 return 0;
569} 568}
570 569
571 570
572/* C. COPYRIGHT AND LICENSE 571/* C. COPYRIGHT AND LICENSE
573 * 572 *
574 * Copyright (C) 2001-2002, 2008 Ravenbrook Limited <http://www.ravenbrook.com/>. 573 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
575 * All rights reserved. This is an open source license. Contact 574 * All rights reserved. This is an open source license. Contact
576 * Ravenbrook for commercial licensing options. 575 * Ravenbrook for commercial licensing options.
577 * 576 *