[RFC,1/5] Bug fix in prepare_for_testing

Message ID 20230415151336.4104455-2-tom@tromey.com
State New
Headers
Series Add new "critical" command to test suite |

Commit Message

Tom Tromey April 15, 2023, 3:13 p.m. UTC
  prepare_for_testing should return the result of clean_restart, but it
currently does not.  This patch fixes the oversight.
---
 gdb/testsuite/lib/gdb.exp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
  

Patch

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 9ea0334759d..a1808c699e9 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -7677,8 +7677,7 @@  proc prepare_for_testing_full {testname args} {
 	}
 	set executable [lindex $spec 0]
     }
-    clean_restart $executable
-    return 0
+    return [clean_restart $executable]
 }
 
 # Prepares for testing, by calling build_executable, and then clean_restart.
@@ -7688,9 +7687,7 @@  proc prepare_for_testing { testname executable {sources ""} {options {debug}}} {
     if {[build_executable $testname $executable $sources $options] == -1} {
         return -1
     }
-    clean_restart $executable
-
-    return 0
+    return [clean_restart $executable]
 }
 
 # Retrieve the value of EXP in the inferior, represented in format