Running testsuite against binary distribution

Asked by Rafael Beims

Hello,
I'm running the GCC testsuite against the precompiled binaries from the package 4.8-2014-q2. I downloaded both the binary and the source package, and I'm running the testsuite with the following command:
sudo mkdir -p /tmp/dump2 && sudo mkdir -p /tmp/dump1&& sudo time /usr/bin/runtest --tool gcc --tool_exec=arm-none-eabi-gcc --srcdir ./ --target=arm-none-eabi --target_board arm-ice -v

I made some modifications to the arm-ice board definition to be able to setup a connection to a XMC-hilight development kit via GDB. A lot of tests run successfully, and I'm still looking through all the cases of failure to verify that my environment is good.

The problem that I'm having that I cannot find a solution is this:
For a lot of tests there seems to be a problem with GDB loading the new binary file (not to the target, but to GDB itself, with the file command). You can find an example of what I mean in the following excerpt:

Testing debug/pr36690-3.c, -gdwarf-2 -g3 -O
doing compile
Executing on host: arm-none-eabi-gcc ./gcc.dg/debug/pr36690-3.c -fno-diagnostics-show-caret -gdwarf-2 -g3 -O -O0 -g -dA -DSTACK_SIZE=8192 -mcpu=cortex-m4 -mthumb -mno-unaligned-access /home/rbeims/src/gcctest_initcode/sysfncs.c /home/rbeims/src/gcctest_initcode/hdlrs.c -nostartfiles -L/home/rbeims/src/gcctest_initcode -T/home/rbeims/src/gcctest_initcode/gcc.ld -u abort -u exit -lm -o ./pr36690-3.exe (timeout = 300)
spawn arm-none-eabi-gcc ./gcc.dg/debug/pr36690-3.c -fno-diagnostics-show-caret -gdwarf-2 -g3 -O -O0 -g -dA -DSTACK_SIZE=8192 -mcpu=cortex-m4 -mthumb -mno-unaligned-access /home/rbeims/src/gcctest_initcode/sysfncs.c /home/rbeims/src/gcctest_initcode/hdlrs.c -nostartfiles -L/home/rbeims/src/gcctest_initcode -T/home/rbeims/src/gcctest_initcode/gcc.ld -u abort -u exit -lm -o ./pr36690-3.exe

pid is 27150 -27150
output is status 0
PASS: gcc.dg/debug/pr36690-3.c -gdwarf-2 -g3 -O (test for excess errors)
delete breakpoints

Delete all breakpoints? (y or n) y

(gdb) info breakpoints

No breakpoints or watchpoints.

(gdb) file ./pr36690-3.exe

Load new symbol table from "/home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe"? (y or n) y

Reading symbols from /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe...BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 65539 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 131075 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 196611 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 262147 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 327683 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 393219 >= 1266 for section `.strtab'

------ Lots of messages like these ----------------------------

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 65554 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 65554 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 65554 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 327697 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 65554 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 65554 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 65554 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 65554 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 196624 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 65554 >= 1266 for section `.strtab'

BFD: /home/rbeims/src/gcctest/gcc-arm-none-eabi-4_8-2014q2-20140609/src/gcc/gcc/testsuite/pr36690-3.exe: invalid string offset 65554 >= 1266 for section `.strtab'

done.

(gdb)

Then the test timeouts and moves on to the next. In the debug section there are a lot of problems like this, and there are some others with a slightly different output but the same effect.

What puzzles me is that if I run the same sequence of commands with the same binary manually in a GDB session there are no problems at all.

Did anyone see anything like this? Can you help me figure out what could be wrong? Is there any other information that would be valuable?

Thanks in advance for any help,
Rafael

Question information

Language:
English Edit question
Status:
Answered
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#1

Hi Rafael,

I don't know if this will solve your problem but there is a script in the contrib directory of GCC's source to do such a test: test_installed. It's made to test an installed compiler rather than a compiler that was just built.

Revision history for this message
Rafael Beims (rbeims) said :
#2

I don't think that it would help with my problem, which seems more like some kind of bug in GDB. Anyway, I was able to workaround the problem forcing a new GDB instance start at each test (instead of reusing the connection for multiple tests).
But thanks for the indication, I didn't know that this script existed. It would have helped me a lot in the beginning when I was trying to figure out the parameters to call runtest...

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#3

From the log it seems something is appended instead of being replaced. Seems like a bug in gdb indeed. I'll try to reproduce and if I can will raise a bug for that. Thanks.

Can you help with this problem?

Provide an answer of your own, or ask Rafael Beims for more information if necessary.

To post a message you must log in.