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 @@ /* abqtest.c: AVAILABLE BLOCK QUEUE TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. */ #include "abq.h" @@ -149,7 +149,6 @@ static void step(void) extern int main(int argc, char *argv[]) { - Res res; mps_arena_t arena; int i; @@ -160,26 +159,23 @@ extern int main(int argc, char *argv[]) die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE), "mps_arena_create"); - res = ABQInit((Arena)arena, &abq, NULL, ABQ_SIZE); - if (res == ResOK) { - abqSize = ABQ_SIZE; - } else { - printf("ABQCreate returned %d\n",res); - return 1; - } + die(ABQInit((Arena)arena, &abq, NULL, ABQ_SIZE), + "ABQInit"); + + abqSize = ABQ_SIZE; for (i = 0; i < TEST_ITER; i++) { step(); } - printf("All tests passed.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* amcss.c: POOL CLASS AMC STRESS TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. */ @@ -315,7 +315,7 @@ static void test(mps_arena_t arena) mps_fmt_destroy(format); } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_thr_t thread; @@ -334,15 +334,14 @@ int main(int argc, char **argv) report(arena); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* amcsshe.c: POOL CLASS AMC STRESS TEST WITH HEADER * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (c) 2002 Global Graphics Software. */ @@ -249,7 +249,7 @@ static void *test(void *arg, size_t s) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_thr_t thread; @@ -266,15 +266,14 @@ int main(int argc, char **argv) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* amcssth.c: POOL CLASS AMC STRESS TEST WITH TWO THREADS * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (c) 2002 Global Graphics Software. * * .posix: This is Posix only. @@ -310,7 +310,7 @@ static void *fooey(void* childIsFinishedReturn) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_thr_t thread; pthread_t pthread1; @@ -337,15 +337,14 @@ int main(int argc, char **argv) report(arena); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* amsss.c: POOL CLASS AMS STRESS TEST * * $Id$ - * Copyright (c) 2001-2002, 2006 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (c) 2002 Global Graphics Software. * * .design: Adapted from amcss.c, but not counting collections, just @@ -198,7 +198,7 @@ static void *test(void *arg, size_t haveAmbigous) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_thr_t thread; mps_fmt_t format; @@ -247,15 +247,14 @@ int main(int argc, char **argv) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002, 2006 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* amssshe.c: POOL CLASS AMS STRESS TEST WITH HEADERS * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * * .design: Adapted from amsss.c. */ @@ -155,7 +155,7 @@ static void *test(void *arg, size_t s) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_thr_t thread; @@ -170,15 +170,14 @@ int main(int argc, char **argv) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* apss.c: AP MANUAL ALLOC STRESS TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. */ @@ -171,7 +171,7 @@ static void testInArena(mps_arena_t arena, mps_pool_debug_option_s *options) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_pool_debug_option_s *bothOptions; @@ -191,15 +191,14 @@ int main(int argc, char **argv) testInArena(arena, bothOptions); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* arenacv.c: ARENA COVERAGE TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * * .coverage: At the moment, we're only trying to cover the new code * (partial mapping of the page table and vm overflow). @@ -402,7 +402,7 @@ static void testSize(Size size) #define TEST_ARENA_SIZE ((Size)16<<22) -int main(void) +int main(int argc, char *argv[]) { void *block; @@ -416,15 +416,14 @@ int main(void) testSize(TEST_ARENA_SIZE); - fflush(stdout); /* synchronize */ - fprintf(stderr, "Conclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* awlut.c: POOL CLASS AWL UNIT TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * * DESIGN * @@ -294,7 +294,7 @@ static void *setup(void *v, size_t s) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { struct guff_s guff; mps_arena_t arena; @@ -316,15 +316,14 @@ int main(int argc, char **argv) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* awluthe.c: POOL CLASS AWL UNIT TEST WITH OBJECT HEADERS * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * * DESIGN * @@ -297,7 +297,7 @@ static void *setup(void *v, size_t s) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { struct guff_s guff; mps_arena_t arena; @@ -319,15 +319,14 @@ int main(int argc, char **argv) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* awlutth.c: THREADING UNIT TEST USING POOL CLASS AWL * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * * DESIGN * @@ -309,7 +309,7 @@ static void *setup_thr(void *v) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; pthread_t pthread1; @@ -327,15 +327,14 @@ int main(int argc, char **argv) pthread_join(pthread1, NULL); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* btss.c: BIT TABLE COVERAGE TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * * .readership: MPS developers * @@ -564,14 +564,14 @@ int main(int argc, char *argv[]) btTests(btlo, bthi, btSize); - printf("\nNo problems detected.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* cbstest.c: COALESCING BLOCK STRUCTURE TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. */ #include "cbs.h" @@ -649,14 +649,14 @@ extern int main(int argc, char *argv[]) printf("Number of deleted large blocks: %ld\n", NDeleteBlocks); printf("Number of grown large blocks: %ld\n", NGrowBlocks); printf("Number of shrunk large blocks: %ld\n", NShrinkBlocks); - printf("\nNo problems detected.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 \ # mv2test cannot be run because MV2 is broken # %%TARGET: When adding a new target, if target is suitable for the # overnight tests, then add it here. -testrun: mpmss apss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \ - mpsicv lockcov poolncv locv qs finalcv finaltest arenacv \ - abqtest cbstest btcv messtest steptest walkt0 - $(^:%=date && $(PFM)/$(VARIETY)/% &&) true +TESTCASES=abqtest amcss amcsshe amsss amssshe apss arenacv awlut \ + awluthe btcv cbstest finalcv finaltest lockcov locv \ + messtest mpmss mpsicv poolncv qs sacss segsmss steptest \ + walkt0 +testrun: $(TESTCASES) + OUTPUT=$$(mktemp /tmp/mps-XXXXXX.log); \ + echo "Logging test output to $$OUTPUT"; \ + $(^:%=(TESTCASE=$(PFM)/$(VARIETY)/%; \ + echo "\n\n-- Running $$TESTCASE at $$(date) --" >> $$OUTPUT && \ + echo "Running $$TESTCASE" && \ + $$TESTCASE >> $$OUTPUT) &&) true # These convenience targets allow one to type "make foo" to build target # 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, ...) static void error(const char *format, ...) { va_list args; - fprintf(stderr, "Fatal error: "); + fprintf(stderr, "Fatal error: "); va_start(args, format); vlog(LOG_ALWAYS, format, args); va_end(args); @@ -964,7 +964,7 @@ int main(int argc, char *argv[]) /* COPYRIGHT AND LICENSE * - * Copyright (C) 2012 Ravenbrook Limited . + * Copyright (c) 2012-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* exposet0.c: ARENA EXPOSE TEST * * $Id$ - * Copyright (c) 2001,2003 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. * * 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) return NULL; } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_thr_t thread; @@ -266,15 +266,14 @@ int main(int argc, char **argv) report(arena); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* expt825.c: Test for bug described in job000825 * * $Id$ - * Copyright (c) 2001,2003 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. * * DESIGN @@ -254,7 +254,7 @@ static void *test(void *arg, size_t s) } -int main(void) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_thr_t thread; @@ -267,14 +267,14 @@ int main(void) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2003 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* finalcv.c: FINALIZATION COVERAGE TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. * * DESIGN @@ -210,7 +210,7 @@ static void *test(void *arg, size_t s) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_thr_t thread; @@ -225,15 +225,14 @@ int main(int argc, char **argv) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* finaltest.c: LARGE-SCALE FINALIZATION TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. * * DESIGN @@ -239,7 +239,7 @@ static void *test(void *arg, size_t s) } -int main(void) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_thr_t thread; @@ -252,14 +252,14 @@ int main(void) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ void libcbt_assert_fail(const char *); mps_clock_t libcbt_clock(void); -int main(void) +int main(int argc, char *argv[]) { int res; - int defects = 0; mps_arena_t arena; res = mps_lib_callback_register("not a callback", (void(*)(void))0); if(MPS_RES_OK == res) { - printf("mps_lib_callback_register claims to successfully register\n" - "an interface that does not exist.\n"); - ++ defects; + error("mps_lib_callback_register claims to successfully register\n" + "an interface that does not exist.\n"); } die(mps_lib_callback_register("mps_lib_assert_fail", (void(*)(void))libcbt_assert_fail), @@ -44,11 +42,8 @@ int main(void) "register clock"); die(mps_arena_create(&arena, mps_arena_class_vm(), (size_t)1000*1000), "mps_arena_create"); - if(defects) { - printf("Conclusion: Defects detected.\n"); - } else { - printf("Conclusion: Failed to find any defects.\n"); - } + + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } @@ -71,7 +66,7 @@ mps_clock_t libcbt_clock(void) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2005 Ravenbrook Limited . + * Copyright (c) 2005-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* locbwcss.c: LOCUS BACKWARDS COMPATIBILITY STRESS TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. */ #include "mpscmvff.h" @@ -176,9 +176,9 @@ static void testInArena(mps_arena_t arena) reportResults(histat, "the high MVFF pool"); if (lostat->max > histat->min) { - printf("\nFOUND PROBLEM - low range overlaps high\n"); + error("\nFOUND PROBLEM - low range overlaps high\n"); } else if (lostat->ncCount != 0 || histat->ncCount != 0) { - printf("\nFOUND POSSIBLE PROBLEM - some non-contiguous allocations\n"); + error("\nFOUND POSSIBLE PROBLEM - some non-contiguous allocations\n"); } else { printf("\nNo problems detected.\n"); } @@ -188,7 +188,7 @@ static void testInArena(mps_arena_t arena) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; @@ -201,13 +201,14 @@ int main(int argc, char **argv) mps_arena_destroy(arena); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* lockcov.c: LOCK COVERAGE TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. */ #include "mpm.h" @@ -9,7 +9,7 @@ #include /* for malloc & free */ -int main(void) +int main(int argc, char *argv[]) { Lock a = malloc(LockSize()); Lock b = malloc(LockSize()); @@ -44,15 +44,14 @@ int main(void) free(a); free(b); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* lockutw3.c: LOCK UTILIZATION TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. */ #include "mpm.h" @@ -64,7 +64,7 @@ DWORD WINAPI thread0(void *p) } -int main(void) +int main(int argc, char *argv[]) { DWORD id; HANDLE t[10]; @@ -87,15 +87,14 @@ int main(void) LockFinish(lock); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* locusss.c: LOCUS STRESS TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. */ #include "mpscmvff.h" @@ -229,7 +229,7 @@ static void runArenaTest(size_t size, } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { randomize(argc, argv); @@ -249,7 +249,7 @@ int main(int argc, char **argv) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* locv.c: LEAF OBJECT POOL CLASS COVERAGE TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * * This is (not much of) a coverage test for the Leaf Object * pool (PoolClassLO). @@ -39,7 +39,7 @@ static mps_fmt_A_s locv_fmt = static mps_addr_t roots[4]; -int main(void) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_pool_t pool; @@ -92,8 +92,7 @@ int main(void) mps_root_destroy(root); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } @@ -168,7 +167,7 @@ static void stepper(mps_addr_t addr, mps_fmt_t fmt, mps_pool_t pool, /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* messtest.c: MESSAGE TEST * * $Id$ - * Copyright (c) 2001-2003 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. */ #include "mpm.h" @@ -268,14 +268,14 @@ extern int main(int argc, char *argv[]) testInterleaving(arena); testDisabling(arena); - printf("\nNo problems detected.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2003 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* mpmss.c: MPM STRESS TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. */ @@ -180,7 +180,7 @@ static int testInArena(mps_arena_t arena, mps_pool_debug_option_s *options) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_pool_debug_option_s *bothOptions; @@ -199,15 +199,14 @@ int main(int argc, char **argv) testInArena(arena, &fenceOptions); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* mpsicv.c: MPSI COVERAGE TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (c) 2002 Global Graphics Software. */ @@ -572,7 +572,7 @@ static void *test(void *arg, size_t s) #define TEST_ARENA_SIZE ((size_t)16<<20) -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_thr_t thread; @@ -598,15 +598,14 @@ int main(int argc, char **argv) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002, 2008 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* mv2test.c: POOLMVT STRESS TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. */ #include @@ -315,18 +315,19 @@ static void stress_with_arena_class(mps_arena_class_t aclass) } -int main(void) +int main(int argc, char *argv[]) { stress_with_arena_class(mps_arena_class_vm()); stress_with_arena_class(mps_arena_class_vmnz()); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ #include "testlib.h" -static Bool testit(ArenaClass class, ...) +static void testit(ArenaClass class, ...) { - Bool eflag = FALSE; Arena arena; Pool pool; Res res; @@ -26,32 +25,25 @@ static Bool testit(ArenaClass class, ...) die(PoolCreate(&pool, arena, PoolClassN()), "PoolNCreate"); res = PoolAlloc(&p, pool, 1, /* withReservoirPermit */ FALSE); if (res == ResOK) { - fprintf(stderr, - "Error: Unexpectedly succeeded in" - "allocating block from PoolN\n"); - eflag = TRUE; + error("Error: Unexpectedly succeeded in" + "allocating block from PoolN\n"); } PoolDestroy(pool); ArenaDestroy(arena); - - return eflag; } -int main(void) +int main(int argc, char *argv[]) { - if (testit((ArenaClass)mps_arena_class_vm(), (Size)600000)) { - fprintf(stderr, "Conclusion: Defects found.\n"); - } else { - fprintf(stderr, "Conclusion: Failed to find any defects.\n"); - } + testit((ArenaClass)mps_arena_class_vm(), (Size)600000); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { void *r; @@ -521,15 +521,14 @@ int main(int argc, char **argv) mps_tramp(&r, &go, NULL, 0); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* sacss.c: SAC MANUAL ALLOC STRESS TEST * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. */ @@ -186,7 +186,7 @@ static int testInArena(mps_arena_t arena) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; @@ -197,15 +197,14 @@ int main(int argc, char **argv) testInArena(arena); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* segsmss.c: Segment splitting and merging stress test * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (c) 2002 Global Graphics Software. * * .design: Adapted from amsss.c (because AMS already supports @@ -841,7 +841,7 @@ static void *test(void *arg, size_t s) } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_thr_t thread; @@ -856,15 +856,14 @@ int main(int argc, char **argv) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* steptest.c: TEST FOR ARENA STEPPING * * $Id$ - * Copyright (C) 1998 Ravenbrook Limited. See end of file for license. + * Copyright (c) 1998-2013 Ravenbrook Limited. See end of file for license. * * Loosely based on . */ @@ -485,7 +485,7 @@ static void *test(void *arg, size_t s) return NULL; } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { prepare_clock(); @@ -507,15 +507,14 @@ int main(int argc, char **argv) ++ test_number; } - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* testlib.c: TEST LIBRARY * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. * * .purpose: A library of functions that may be of use to unit tests. @@ -252,7 +252,7 @@ mps_addr_t rnd_addr(void) * (New from 2010-03-22, changelist 170093) */ -void randomize(int argc, char **argv) +void randomize(int argc, char *argv[]) { int i; int n; @@ -262,7 +262,8 @@ void randomize(int argc, char **argv) if (argc > 1) { n = sscanf(argv[1], "%lu", &seed0); Insist(n == 1); - printf("randomize(): resetting initial state (v3) to: %lu.\n", seed0); + printf("%s: randomize(): resetting initial state (v3) to: %lu.\n", + argv[0], seed0); rnd_state_set(seed0); } else { /* time_t uses an arbitrary encoding, but hopefully the low order */ @@ -288,7 +289,8 @@ void randomize(int argc, char **argv) } seed0 = rnd_state(); - printf("randomize(): choosing initial state (v3): %lu.\n", seed0); + printf("%s: randomize(): choosing initial state (v3): %lu.\n", + argv[0], seed0); rnd_state_set(seed0); } } @@ -386,7 +388,7 @@ void cdie(int res, const char *s) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002, 2008 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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 @@ /* testlib.h: TEST LIBRARY INTERFACE * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. * * .purpose: A library of functions that may be of use to unit tests. @@ -212,7 +212,7 @@ extern mps_addr_t rnd_addr(void); * line argument) and initializes the generator to the same state. */ -extern void randomize(int argc, char **argv); +extern void randomize(int argc, char *argv[]); #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 @@ /* walkt0.c: WALK TEST 0 * * $Id$ - * Copyright (C) 1998,2003 Ravenbrook Limited. See end of file for license. + * Copyright (c) 1998-2013 Ravenbrook Limited. See end of file for license. * * Loosely based on . */ @@ -194,7 +194,7 @@ static void *test(void *arg, size_t s) return NULL; } -int main(int argc, char **argv) +int main(int argc, char *argv[]) { mps_arena_t arena; mps_thr_t thread; @@ -210,15 +210,14 @@ int main(int argc, char **argv) mps_thread_dereg(thread); mps_arena_destroy(arena); - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2003 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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) /* main -- runs various test scripts * */ -int main(int argc, char **argv) +int main(int argc, char *argv[]) { randomize(argc, argv); @@ -929,15 +929,14 @@ int main(int argc, char **argv) testscriptA("Arena(size 16777216), Katalog(), Collect."); */ - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002, 2008 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * 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) /* main -- runs various test scripts * */ -int main(int argc, char **argv) +int main(int argc, char *argv[]) { randomize(argc, argv); @@ -563,15 +563,14 @@ int main(int argc, char **argv) TIMCA_setup(""); /* must reset it! */ } - fflush(stdout); /* synchronize */ - fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); + printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0; } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002, 2008 Ravenbrook Limited . + * Copyright (c) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. *