Skip two more attach tests when testing against stub-like targets
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / attach-twice.exp
index 654ceca5616eb4f9032a117cf52c14ad6527e94f..f6a9eb6f5ee443596ca17b648f6f101a9b09e779 100644 (file)
@@ -13,8 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Manipulation with PID on target is not supported.
-if [is_remote target] then {
+if {![can_spawn_for_attach]} {
     return 0
 }
 
@@ -25,8 +24,10 @@ if { [prepare_for_testing ${testfile}.exp $executable] } {
     return -1
 }
 
-set testpid [eval exec $binfile &]
-exec sleep 2
+# Start the program running and then wait for a bit, to be sure
+# that it can be attached to.
+
+set testpid [spawn_wait_for_attach $binfile]
 
 set parentpid 0
 
This page took 0.024657 seconds and 4 git commands to generate.