[m-dev.] Test failures during porting to ARM

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Nov 23 00:48:16 AEDT 2005


On Tue, 22 Nov 2005, Sergey Khorev wrote:

> Recently I've built Mercury-0.12.0-release on Sharp Zaurus with ARM CPU (pdaXrom linux).
> After selecting arbitrary ARM registers I've got working asm_fast.gc, hlc.gc
> and asm_fast.gc.tr.debug grades.

That's great!

> Although not all tests work flawlessly. Some of them fail because of somewhat
> non-standard layout of the system utilities and shared objects.
>

You may need to make some additions to runtime/mercury_goto.h to get the
latter to work correctly.


> But there are several confusing cases in tabling directory. E.g.,
> ------------------------------------------------------------------------------
> RUNNING TEST tabling/loopcheck in grade asm_fast.gc
> make[5]: Entering directory `/mnt/cf/mercury-tests-0.12.0/tabling'
> mmc --generate-dependencies --grade asm_fast.gc          loopcheck
> make[5]: Leaving directory `/mnt/cf/mercury-tests-0.12.0/tabling'
> make[5]: Entering directory `/mnt/cf/mercury-tests-0.12.0/tabling'
> mmc --compile-to-c --grade asm_fast.gc          loopcheck > loopcheck.err 2>&1
> mgnuc --grade asm_fast.gc        --      -c loopcheck.c -o loopcheck.o
> mgnuc --grade asm_fast.gc        --      -c loopcheck_init.c -o loopcheck_init.o
> ml --grade asm_fast.gc              --    -o loopcheck loopcheck_init.o \
> 	loopcheck.o \
>
> if ./loopcheck > loopcheck.out.tmp 2>&1; then \
> 	grep . loopcheck.out.tmp; \
> 	exit 1; \
> else \
> 	sed	-e 's/exception.m:[0-9]*/exception.m:NNNN/g' \
> 		-e 's/require.m:[0-9]*/require.m:NNNN/g' \
> 		< loopcheck.out.tmp > loopcheck.out; \
> 	rm -f loopcheck.out.tmp; \
> fi
> Comparing loopcheck.out with loopcheck.exp*,
> 	results in loopcheck.res
> ** loopcheck.out did not match the expected output
> ** (closest match was loopcheck.res1)
> *** loopcheck.exp	Tue Jul 20 08:41:42 2004
> --- loopcheck.out	Mon Nov 21 23:11:12 2005
> ***************
> *** 1,2 ****
> --- 1,3 ----
>   Uncaught Mercury exception:
>   Software Error: detected infinite recursion in pred loopcheck.loop/1
> + Stack dump not available in this grade.
> make[5]: *** [loopcheck.res] Error 1
> make[5]: Target `loopcheck.runtest' not remade because of errors.
> make[5]: Leaving directory `/mnt/cf/mercury-tests-0.12.0/tabling'
> FAILED TEST tabling/loopcheck in grade asm_fast.gc
> ------------------------------------------------------------------------------
>
> Is this a real failure? It just prints an additional message about unavailable stack dump.
>

No it's not a real failure.  The expected outputs in that directory
assume that the environment variable MERCURY_SUPPRESS_STACK_TRACE has been set
to yes (this will cause the compiler to omit the message about the
unavailable stack trace).  When the tests are run from the bootcheck
script this variable should be set.

> Also valid/ho_and_type_spec_bug.m refuses to compile with
> ------------------------------------------------------------------------------
> Uncaught Mercury exception:
> Software Error: map__lookup: key not found
> 	Key Type: term.var(parse_tree.prog_data.prog_var_type)
> 	Key Value: var(20)
> 	Value Type: ll_backend.var_locn.var_state
> Stack dump not available in this grade.
> ------------------------------------------------------------------------------
>
> But the comments says that
> % Compiling the following program at -O3 causes the following
> % assertion failure in the compiler:
> %
> %	 Uncaught Mercury exception:
> %	 Software Error: map__lookup: key not found
> % 		Key Type: term.var(parse_tree.prog_data.prog_var_type)
> % 		Key Value: var(20)
> % 		Value Type: ll_backend.var_locn.var_state
>
> Is that a failure?

You should expect this test case to fail; it is a known bug with 0.12.
There is a workaround mentioned in the BUGS file.

Cheers,
Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list