On Tue, Mar 23, 2010 at 1:20 PM, Joel Sherrill <joel.sherr...@oarcorp.com> wrote: > On 03/23/2010 03:01 PM, Janis Johnson wrote: >> >> On Tue, Mar 23, 2010 at 10:56 AM, Joel Sherrill >> <joel.sherr...@oarcorp.com> wrote: >> >>> >>> Hi, >>> >>> There are a number of failures in my latest run >>> of sparc-rtems4.10 but the ones I have gone back >>> and run the executable by hand actually pass. >>> I have no idea why this is happening and wondered >>> if someone had some insight as to what I should >>> look at next. From gcc.log >>> >>> Executing on host: /users/joel/test-gcc/b-gcc1-sparc/gcc/xgcc >>> -B/users/joel/test-gcc/b-gcc1-sparc/gcc/ >>> >>> /users/joel/test-gcc/gcc-svn/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.c >>> >>> /users/joel/test-gcc/gcc-svn/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk-lib.c >>> >>> /users/joel/test-gcc/gcc-svn/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c >>> gcc_tg.o -w -O0 -DSTACK_SIZE=2048 -isystem >>> /users/joel/test-gcc/b-gcc1-sparc/sparc-rtems4.10/./newlib/targ-include >>> -isystem /users/joel/test-gcc/gcc-svn/newlib/libc/include >>> -B/users/joel/test-gcc/install-svn/sparc-rtems4.10/sis/lib/ -specs >>> bsp_specs >>> -qrtems -mcpu=cypress >>> -B/users/joel/test-gcc/b-gcc1-sparc/sparc-rtems4.10/./newlib/ >>> -L/users/joel/test-gcc/b-gcc1-sparc/sparc-rtems4.10/./newlib >>> /users/joel/test-gcc/b-gcc1-sparc/rtems_gcc_main.o -Wl,-wrap,exit >>> -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -lm -o >>> /users/joel/test-gcc/b-gcc1-sparc/gcc/testsuite/gcc/snprintf-chk.x0 >>> (timeout = 300) >>> PASS: gcc.c-torture/execute/builtins/snprintf-chk.c compilation, -O0 >>> sparc-rtems4.10-run is >>> /users/joel/test-gcc/install-svn/bin/sparc-rtems4.10-run >>> Running >>> /users/joel/test-gcc/b-gcc1-sparc/gcc/testsuite/gcc/snprintf-chk.x0 >>> for maximum 60 seconds >>> FAIL: gcc.c-torture/execute/builtins/snprintf-chk.c execution, -O0 >>> >>> So it compiles but apparently fails to run. OK >>> so I run it by hand: >>> >>> $ /users/joel/test-gcc/install-svn/bin/sparc-rtems4.10-run >>> snprintf-chk.x0 >>> >>> *** EXIT code 0 >>> [j...@rtbf64b gcc]$ echo $? >>> 0 >>> >>> Any suggestions on how to track down what is going wrong? >>> >> >> What are /users/joel/test-gcc/b-gcc1-sparc/rtems_gcc_main.o and >> -Wl,-wrap,main? Is main being replaced by something that doesn't >> return 0? >> > > rtems_gcc_main.c is a file with the RTEMS OS configuration in it. > It specifies to start running the user program at main, the stack > size, etc. It does not contain main() -- just a pointer to main(). > > We don't return a value. We set this for the simulator. > > set_board_info needs_status_wrapper 1 > > Which turns on the linker option to wrap main() and > enables some standard support code to for the main > wrapper to take the exit code and print it stdout. > > Or at least that's what it used to do. > > Is there anyway to get some visibility as to why the > scripting thinks it is failing?
You'll need to add some messages to DejaGnu's procedures in the .exp files in share/dejagnu, under where DejaGnu is installed on your system. I don't know much about the ones used for running on simulators or remote systems, it's all pretty awful. Janis