Skip two more attach tests when testing against stub-like targets

Message ID 1421189230-2516-1-git-send-email-donb@codesourcery.com
State New, archived
Headers

Commit Message

Don Breazeal Jan. 13, 2015, 10:47 p.m. UTC
  This is a follow-up to Pedro's recent patch 'Skip "attach" tests when
testing against stub-like targets'
(https://sourceware.org/ml/gdb-patches/2015-01/msg00119.html).  This
patch replaces "is_remote target" with "can_spawn_for_attach" in 
two more attach tests where "attach" doesn't make sense so that they
are skipped when appropriate.

Tested with i686-mingw32 host and i686-pc-linux-gnu build/target.

OK?

Thanks
--Don

gdb/testsuite/
2015-01-13  Don Breazeal  <donb@codesourcery.com>

	* gdb.base/attach-pie-noexec.exp: Use can_spawn_for_attach
	instead of checking whether the target board is remote.
	* gdb.base/attach-twice.exp: Likewise.

---
 gdb/testsuite/gdb.base/attach-pie-noexec.exp |    3 +--
 gdb/testsuite/gdb.base/attach-twice.exp      |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
  

Comments

Pedro Alves Jan. 14, 2015, 9:40 a.m. UTC | #1
On 01/13/2015 10:47 PM, Don Breazeal wrote:

> gdb/testsuite/
> 2015-01-13  Don Breazeal  <donb@codesourcery.com>
> 
> 	* gdb.base/attach-pie-noexec.exp: Use can_spawn_for_attach
> 	instead of checking whether the target board is remote.
> 	* gdb.base/attach-twice.exp: Likewise.

Could you make the tests use spawn_wait_for_attach too?

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/testsuite/gdb.base/attach-pie-noexec.exp b/gdb/testsuite/gdb.base/attach-pie-noexec.exp
index f6aa1c8..b53d516 100644
--- a/gdb/testsuite/gdb.base/attach-pie-noexec.exp
+++ b/gdb/testsuite/gdb.base/attach-pie-noexec.exp
@@ -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
 }
 
diff --git a/gdb/testsuite/gdb.base/attach-twice.exp b/gdb/testsuite/gdb.base/attach-twice.exp
index 654ceca..eb03c92 100644
--- a/gdb/testsuite/gdb.base/attach-twice.exp
+++ b/gdb/testsuite/gdb.base/attach-twice.exp
@@ -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
 }