Fix gdb.python/py-evthreads.exp with --target_board=native-extended-gdbserver
authorPedro Alves <palves@redhat.com>
Fri, 13 Oct 2017 12:15:04 +0000 (13:15 +0100)
committerPedro Alves <palves@redhat.com>
Fri, 13 Oct 2017 12:15:04 +0000 (13:15 +0100)
Fixes:
  Running ..../src/gdb/testsuite/gdb.python/py-evthreads.exp ...
  FAIL: gdb.python/py-evthreads.exp: run to breakpoint 1
  FAIL: gdb.python/py-evthreads.exp: reached breakpoint 2
  FAIL: gdb.python/py-evthreads.exp: thread 2
  FAIL: gdb.python/py-evthreads.exp: reached breakpoint 3
  FAIL: gdb.python/py-evthreads.exp: thread 3
  FAIL: gdb.python/py-evthreads.exp: continue thread 1
  [... cascading time outs ...]

By following the usual pattern that makes sure that non-stop is enabled
before connecting to gdbserver.

gdb/testsuite/ChangeLog:
2017-10-13  Pedro Alves  <palves@redhat.com>

* gdb.python/py-evthreads.exp: Start GDB with "set non-stop on"
already.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-evthreads.exp

index 4c011024757b3fe5512d7cfe1162a0aaa74e67f5..e8afca552f1cd175b19f6ffdd1286bca27837983 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-13  Pedro Alves  <palves@redhat.com>
+
+       * gdb.python/py-evthreads.exp: Start GDB with "set non-stop on"
+       already.
+
 2017-10-13  Pedro Alves  <palves@redhat.com>
 
        * gdb.python/py-evsignal.exp: Check gdb_protocol instead of
index 64b2af5fef41e42dbbb56e1e8fa7ed873404d3fd..31b86abf45f95ca29661467060624d35332ad4a5 100644 (file)
@@ -32,14 +32,17 @@ set pyfile ${srcdir}/${subdir}/py-events.py
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     return -1
 }
-clean_restart $testfile
+
+save_vars { GDBFLAGS } {
+    append GDBFLAGS " -ex \"set non-stop on\""
+    clean_restart $testfile
+}
 
 if { [skip_python_tests] } { continue }
 
 gdb_test_no_output "source ${pyfile}" "load python file"
 
 gdb_test "test-events" "Event testers registered."
-gdb_test_no_output "set non-stop on"
 
 gdb_breakpoint "main"
 gdb_breakpoint "thread2"