Don't rely on inferior I/O in gdb.base/restore.exp
authorPedro Alves <palves@redhat.com>
Wed, 29 Jul 2015 10:09:37 +0000 (11:09 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 29 Jul 2015 10:09:37 +0000 (11:09 +0100)
There seems to be no point in relying on stdio here.  Simply use
gdb_continue_to_end instead.

(not removing the printf calls, as the .c file is half generated.)

gdb/testsuite/ChangeLog:
2015-07-29  Pedro Alves  <palves@redhat.com>

* gdb.base/restore.exp (restore_tests): Use gdb_continue_to_end.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/restore.exp

index 8866884cecff50e2e1dd5094756b08d22ef39e8e..1820b275d305277248d34fe680d2cbf997390f8e 100644 (file)
@@ -1,3 +1,7 @@
+2015-07-29  Pedro Alves  <palves@redhat.com>
+
+       * gdb.base/restore.exp (restore_tests): Use gdb_continue_to_end.
+
 2015-07-29  Pedro Alves  <palves@redhat.com>
 
        * gdb.base/call-signal-resume.exp: Remove check for
index a02ba4f1d823b21a6154ae1ee00c9e17ff2f9af2..bd9dfbf2e7623176358f9d11e2619c8016205930 100644 (file)
@@ -79,20 +79,7 @@ proc restore_tests { } {
         }
     }
 
-    if ![gdb_skip_stdio_test "run to completion"] {
-       send_gdb "continue\n"
-
-       gdb_expect {
-           -re "exiting" {
-               pass "run to completion"
-           }
-           timeout { 
-               fail "(timeout) run to completion"
-           }
-       }
-    } else {
-       gdb_test "continue" ".*" ""
-    }
+    gdb_continue_to_end "" continue 1
 }
 
 set prev_timeout $timeout