[Pkg-octave-devel] Bug#532656: Bug#532656: octave3.2_3.2.0-1(mips/unstable): FTBFS on mips. Segfault in regression test.

Rafael Laboissiere rafael at debian.org
Wed Jun 17 19:01:31 UTC 2009


* John W. Eaton <jwe at jweaton.org> [2009-06-17 14:24]:

> Are you sure you would want this?  It won't tell you if the printing
> is correct without manual inspection, and will clutter the output from
> running "make check" with
> 
>     src/pr-output.cc .......................................ans =  0 + 0i
>   ans =    0 + Infi
>   ans =    0 - Infi
>   ans =    0 + NaNi
>   ans = Inf +   0i
>   ans = Inf + Infi
>   ans = Inf - Infi
>   ans = Inf + NaNi
>   ans = -Inf +   0i
>   ans = -Inf + Infi
>   ans = -Inf - Infi
>   ans = -Inf + NaNi
>   ans = NaN +   0i
>   ans = NaN + Infi
>   ans = NaN - Infi
>   ans = NaN + NaNi
>    PASS    1/1   
> 
> Is there another way to test this without printing the output to the
> sreen?  Maybe use fdisp to put the output in a file and then compare
> the contents of the file to some expected value?

That would be surely better.  Actually, in the specific case I had in
mind (NaN problem on mips/mipsel) there would be no need to compare the
output, just to exercise the code in pr-output.cc.  So, the test could
be, for now:

/* 
%!test
%! format short
%! file = tempname ()
%! fd = fopen (file)
%! for r = [0, Inf -Inf, NaN]
%!     for i = [0, Inf -Inf, NaN]
%!         fdisp (fd, complex (r, i))
%!     endfor
%! endfor
%! fclose (fd)
%! unlink (file)
*/                                 

-- 
Rafael





More information about the Pkg-octave-devel mailing list