1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-25 16:22:37 -07:00

Explain how to run the mmqa test suite on any unix.

Remove unused variables and avoid pointer->int conversions, so that the MMQA tests will run on platform lii6gc.

Copied from Perforce
 Change: 187185
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-10-10 15:32:30 +01:00
parent d1d3b81d2b
commit 3430fc8e10
4 changed files with 14 additions and 20 deletions

View file

@ -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``.)

View file

@ -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;

View file

@ -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!

View file

@ -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;