autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EUnit failure?


From: Romain Lenglet
Subject: Re: EUnit failure?
Date: Wed, 12 Aug 2009 09:55:08 +0900
User-agent: Thunderbird 2.0.0.22 (Macintosh/20090605)

Ralf Wildenhues wrote:
>> #                             -*- compilation -*-
>> 1. suite.at:2: testing ...
>> ./suite.at:3: "$ERLC" $ERLCFLAGS -b beam my_testsuite.erl
>> ./suite.at:3: "$ERL" -pa "${abs_top_builddir}/s" -s my_testsuite test 
>> $at_eunit_options -noshell
>> --- /dev/null 2008-08-11 20:08:11.000000000 +0200
>> +++ 
>> /tmp/autoconf/build/tests/testsuite.dir/186/t/suite.dir/at-groups/1/stderr   
>>   2009-08-11 20:12:12.000000000 +0200
>> @@ -0,0 +1,3 @@
>> +
>> +Crash dump was written to: erl_crash.dump
>> +init terminating in do_boot ()
>> stdout:
>> {"init terminating in 
>> do_boot",{undef,[{init,stop,"M"},{init,start_it,1},{init,start_em,1}]}}
>> ./suite.at:3: exit code was 1, expected 0
>> 1. suite.at:2: 1. my only test (suite.at:2): FAILED (suite.at:3)

The Erlang VM doesn't expect programs to call init:stop() in this state
(VM init) with a code != 0. It generates an erl_crash.dump, but it's not
a big deal.
In my other Erlang tests, I always use halt(code) instead, which is
faster and never generates an erl_crash.dump, but unfortunately doesn't
flush the standard output. So halt() is not directly usable here,
because the user may need the output from EUnit. init:stop() flushes the
standard output before exiting.
I will try to do it more cleanly, like explicitly flushing the standard
output and then calling halt(...).

But in this case, there is something very wrong happening. The program
calls init:stop() and fails, instead normally existing with one of the
possible error codes (0, 1, or 77).
Can you please send me the conftest.erl program that is generated by
AT_CHECK_EUNIT?
Which version of Erlang are you using (which package have you downloaded
or installed)? Please run "erl" and copy the line "Erlang (BEAM)
emulator ...".

> If you like I can provide the erl_crash.dump file (170K uncompressed).

Yes, please send it to me. It may be helpful.

> BTW, Romain, what is this line
>   cp "$abs_top_srcdir/build-aux/install-sh" pkg
> 
> in the test source of this test group used for?

I did copy-and-paste from other tests in autotest.at, namely [srcdir
propagation], as a basis for my tests, and I thought that this was
necessary.

Initially, my patch put everything in pkg/s and pkg/t. Then, Paolo
simplified it to put everything directly under ./s and ./t, but didn't
update this line.
Even though this line doesn't do anything useful anymore, the test
doesn't crash, so it's obviously not necessary.

--
Romain Lenglet




reply via email to

[Prev in Thread] Current Thread [Next in Thread]