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]

[obv] testsuite: gdb.base/foll-exec.exp: Fix racy FAIL


Hi,

I was getting:
 (gdb) PASS: gdb.base/foll-exec.exp: continue to first exec catchpoint
 kill
 Kill the program being debugged? (y or n) y
+file gdb/testsuite.unix.-m32/gdb.base/(gdb) FAIL: gdb.base/foll-exec.exp: loading symbols (timeout)
+ERROR: info breakpoints (timeout)

read1/writew did not help in this case.  strace of expect revealed:

read(6, "Kill the program being debugged? (y or n) ", 4096) = 42
write(6, "y\n", 2)                      = 2
write(6, "file /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.base/foll-exec\n", 70) = 70
read(6, "y\r\nfile /home/jkratoch/redhat/gdb-clean/gdb/testsuite(gdb) ", 4096) = 59
select(7, [6], [], [6], {9, 999999})    = 0 (Timeout)
write(4, "FAIL: gdb.base/foll-exec.exp: loading symbols (timeout)\n", 56) = 56

Therefore checked in as obvious.

The problem was 90% reproducible for me and now 0% reproducible for 30 passes.
Tested on x86_64-fedora16-linux-gnu.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2011-12/msg00004.html

--- src/gdb/testsuite/ChangeLog	2011/11/30 08:25:15	1.2952
+++ src/gdb/testsuite/ChangeLog	2011/12/01 22:06:45	1.2953
@@ -1,3 +1,9 @@
+2011-12-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix racy FAILs.
+	* gdb.base/foll-exec.exp (zap_session): Use gdb_test_no_output instead
+	of send_gdb.
+
 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
 
 	* gdb.base/testenv.exp: Skip on remote targets.  Unset global
--- src/gdb/testsuite/gdb.base/foll-exec.exp	2011/01/11 19:16:23	1.15
+++ src/gdb/testsuite/gdb.base/foll-exec.exp	2011/12/01 22:06:45	1.16
@@ -51,7 +51,7 @@
    send_gdb "kill\n"
    gdb_expect {
      -re ".*Kill the program being debugged.*y or n. $" {
-       send_gdb "y\n"
+       gdb_test_no_output "y" ""
        send_gdb "file $binfile\n"
        gdb_expect {
          -re ".*Load new symbol table from.*y or n. $" {


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