diff --git a/mps/test/README b/mps/test/README index aae904f53e4..f5495c7aca1 100644 --- a/mps/test/README +++ b/mps/test/README @@ -6,20 +6,22 @@ to see what version of the harness you have (or look at the file "test/version"). -Running on OS X +Testing on unix --------------- -On OS X you can invoke the test suite like this (from the root of the -master sources or development branch):: +From the root of the master sources or development branch:: - $ ./configure && make - $ alias qa="perl test/test/qa -i code -l code/xc/mps.build/Debug/mps.build/Objects-normal/x86_64/mps.o" + $ PLATFORM=lii6ll # substitute your platform + $ make -C code -f $PLATFORM.gmk VARIETY=cool $PLATFORM/cool/mps.o + $ alias qa="perl test/test/qa -i code -l code/$PLATFORM/cool/mps.o" $ qa clib $ qa run test/function/5.c $ qa runset test/testsets/passing Each test case is compiled in its turn to the file -``test/test/obj/Darwin_12.3.0_i386__unix/tmp_test`` so you can debug it -with:: +``test/test/obj/$(uname -s)_$(uname -r)_$(uname -p)__unix/tmp_test`` +so you can debug it with:: - $ lldb test/test/obj/Darwin_12.3.0_i386__unix/tmp_test + $ lldb test/test/obj/$(uname -s)_$(uname -r)_$(uname -p)__unix/tmp_test + +(Or ``gdb`` instead of ``lldb``.) diff --git a/mps/test/test/testlib/fastfmt.c b/mps/test/test/testlib/fastfmt.c index 17f3512bca5..80beda1f4a2 100644 --- a/mps/test/test/testlib/fastfmt.c +++ b/mps/test/test/testlib/fastfmt.c @@ -139,7 +139,7 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit) { mycell *obj = base; mps_res_t res; - mps_addr_t p, q; + mps_addr_t p; switch (obj->tag & 0x3) { @@ -151,7 +151,6 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit) /* make sure to fix the assoc pointer first */ p = obj->data.assoc; if (p != NULL) { - q = p; res = MPS_FIX(ss, (mps_addr_t *) &p); if (res != MPS_RES_OK) return res; obj->data.assoc = p; @@ -162,7 +161,6 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit) p = obj->data.ref[i].addr; if (p != NULL) { - q = p; res = MPS_FIX(ss, (mps_addr_t *) &p); if (res != MPS_RES_OK) return res; obj->data.ref[i].addr = p; diff --git a/mps/test/test/testlib/myfmt.c b/mps/test/test/testlib/myfmt.c index 1e56d854875..2dd95617a56 100644 --- a/mps/test/test/testlib/myfmt.c +++ b/mps/test/test/testlib/myfmt.c @@ -102,7 +102,7 @@ mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit) if (obj->ref[0] != NULL) { - if (formatcomments) printf("Fix: %x.\n", (int) &(obj->ref[0])); + if (formatcomments) printf("Fix: %p.\n", (void*)&(obj->ref[0])); res = MPS_FIX(ss, (mps_addr_t *) &(obj->ref[0])); /* pun! */ if (res != MPS_RES_OK) { @@ -111,7 +111,7 @@ mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit) } if (obj->ref[1] != NULL) { - if (formatcomments) printf("Fix: %x.\n", (int) &(obj->ref[1])); + if (formatcomments) printf("Fix: %p.\n", (void*)&(obj->ref[1])); res = MPS_FIX(ss, (mps_addr_t *) &(obj->ref[1])); /* pun! */ if (res != MPS_RES_OK) { @@ -154,7 +154,7 @@ void mycopy(mps_addr_t object, mps_addr_t to) /* mycell *toj = to; */ - if (formatcomments) printf("copy! %x -> %x\n", (int) object, (int) to); + if (formatcomments) printf("copy! %p -> %p\n", object, to); /* this line is bad, because the objects might overlap, and then C doesn't guarantee to do the right thing! diff --git a/mps/test/test/testlib/testlib.c b/mps/test/test/testlib/testlib.c index 1303ceaf502..227e5988e10 100644 --- a/mps/test/test/testlib/testlib.c +++ b/mps/test/test/testlib/testlib.c @@ -552,18 +552,12 @@ void *TQElement(TimeQueue TQ) void *TQPop(TimeQueue TQ) { - void *ref; - void *nref; - unsigned long ntime; unsigned long i, c, s; asserts(!TQEmpty(TQ), "TQPop called on empty TimeQueue"); - ref = TQ->element[0].ref; TQ->used -= 1; s = TQ->used; - ntime = TQ->element[s].time; - nref = TQ->element[s].ref; i = 0; while (1) { c = (2*i)+1;