This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Sporadic failures of selftest tests


Hello,

I'm now seeing sporadic failures of some of the self-test test cases
running natively on x64_86.  A failing case looks like:

(gdb) break captured_command_loop
Breakpoint 1 at 0x7117b0: file ../../binutils-gdb/gdb/main.c, line 324.
(gdb) PASS: gdb.gdb/complaints.exp: breakpoint in captured_command_loop
run -nw -nx -data-directory /home/uweigand/fsf/binutils-gdb-build/gdb/testsuite/../data-directory
Starting program: /home/uweigand/fsf/binutils-gdb-build/gdb/testsuite/outputs/gdb.gdb/complaints/xgdb -nw -nx -data-directory /home/uweigand/fsf/binutils-gdb-build/gdb/testsuite/../data-directory
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
GNU gdb (GDB) 8.0.50.20171017-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) FAIL: gdb.gdb/complaints.exp: run until breakpoint at captured_command_loop
WARNING: Couldn't test self

while the good case looks instead like:

(gdb) break captured_command_loop
Breakpoint 1 at 0x7117b0: file ../../binutils-gdb/gdb/main.c, line 324.
(gdb) PASS: gdb.gdb/complaints.exp: breakpoint in captured_command_loop
run -nw -nx -data-directory /home/uweigand/fsf/binutils-gdb-build/gdb/testsuite/../data-directory
Starting program: /home/uweigand/fsf/binutils-gdb-build/gdb/testsuite/outputs/gdb.gdb/complaints/xgdb -nw -nx -data-directory /home/uweigand/fsf/binutils-gdb-build/gdb/testsuite/../data-directory
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
GNU gdb (GDB) 8.0.50.20171017-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) 
Breakpoint 1, captured_main (data=0x7fffffffd2e0) at ../../binutils-gdb/gdb/main.c:1147
1147              captured_command_loop ();
(gdb) XFAIL: gdb.gdb/complaints.exp: run until breakpoint at captured_command_loop (line numbers scrambled?)

Just from reading the logs this looks like the gdb_test_multiple in selftest_setup
gets the GDB prompt from the inferior GDB and assumes it comes from the outer GDB.
Depending on the exact timing, it might see this before the breakpoint message,
and fall into the failure case of the gdb_test_multiple ...

Pedro, I'm not sure if this may have anything to do with your recent testsuite
changes, but I didn't see any other obvious candidates in the logs either :-)

Have you see this issue before?  How is this supposed to work in the first place?
Is there anything that would allow the testsuite to distinguish the gdb prompts
emitted by the two GDBs?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]