public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Sporadic failures of selftest tests
@ 2017-10-17 14:00 Ulrich Weigand
  2017-10-17 14:25 ` Pedro Alves
  0 siblings, 1 reply; 10+ messages in thread
From: Ulrich Weigand @ 2017-10-17 14:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: palves

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-10-20 14:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17 14:00 Sporadic failures of selftest tests Ulrich Weigand
2017-10-17 14:25 ` Pedro Alves
2017-10-17 14:34   ` Pedro Alves
2017-10-17 14:40     ` Pedro Alves
2017-10-17 14:55       ` Pedro Alves
2017-10-17 15:48         ` Ulrich Weigand
2017-10-17 15:54           ` Pedro Alves
2017-10-17 16:12             ` Pedro Alves
2017-10-20 12:51               ` Ulrich Weigand
2017-10-20 14:32                 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).