Error running make check
Benjamin Lindner
lindnerben at gmx.net
Tue Jan 13 14:51:37 CST 2009
John W. Eaton wrote:
> On 12-Jan-2009, Benjamin Lindner wrote:
>
> | Hello list,
> |
> | I built the current development sources (8455:fd11a08a9b31) under
> | mingw32, and the build process finishes cleanly.
> | If I then run "make check" I get the following error:
> | make check
> | make -f octMakefile check
> | make[1]: Entering directory
> | `/octaveforge_mingw32/octave/.build_mingw32_3.1.x-3_gcc-4.3.0-dw2'
> | make -C test check
> | make[2]: Entering directory
> | `/octaveforge_mingw32/octave/.build_mingw32_3.1.x-3_gcc-4.3.0-dw2/test'
> | ../run-octave --norc --silent --no-history
> | /octaveforge_mingw32/octave/octave-3.1.x/test/fntests.m
> | /octaveforge_mingw32/octave/octave-3.1.x/test
> |
> | Integrated test scripts:
> |
> | reshape: size mismatch
> | make[2]: Leaving directory
> | `/octaveforge_mingw32/octave/.build_mingw32_3.1.x-3_gcc-4.3.0-dw2/test'
> | make[1]: Leaving directory
> | `/octaveforge_mingw32/octave/.build_mingw32_3.1.x-3_gcc-4.3.0-dw2'
> |
> | Now the message "reshape: size mismatch" is not really helpful (which
> | sizes?, where called?), and it also does not print a calling stack, so
> | I'm at loss as to where this error occurs., and how to debug it
>
> Is this message printed when you simply try to run Octave with the
> ./run-octave script, or only when you try to run the tests?
>
I tracked this down to function print_test_file_name (nm) in fntests.m.
The statement
filler = repmat (".", 1, 55-length (nm));
fails if the passed file name ("nm") is longer than 55 characters.
enclosing it in check as
diff -r a02ccd9ff482 test/fntests.m
--- a/test/fntests.m Mon Jan 12 15:30:27 2009 +0100
+++ b/test/fntests.m Tue Jan 13 21:48:12 2009 +0100
@@ -53,7 +53,11 @@
endif
function print_test_file_name (nm)
- filler = repmat (".", 1, 55-length (nm));
+ if( length(nm)<55 )
+ filler = repmat (".", 1, 55-length (nm));
+ else
+ filler = "";
+ endif
printf (" %s %s", nm, filler);
endfunction
solves the problem.
However this is only a workaround for make check.
You can also trigger the error by
repmat(".",1,-1);
i.e. negative sizes as arguments.
Should this be checked for in repmat or somewhere else?
benjamin
More information about the Bug-octave
mailing list