From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21516 invoked by alias); 9 Jan 2015 11:24:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 21506 invoked by uid 89); 9 Jan 2015 11:24:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 09 Jan 2015 11:24:48 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t09BOkMe023604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 9 Jan 2015 06:24:46 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t09BOhZm004050; Fri, 9 Jan 2015 06:24:44 -0500 Message-ID: <54AFBA7B.6040403@redhat.com> Date: Fri, 09 Jan 2015 11:24:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Breazeal, Don" , Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH] skip "attach" tests when testing against stub-like targets References: <1418748834-27545-1-git-send-email-palves@redhat.com> <1418748834-27545-6-git-send-email-palves@redhat.com> <87wq5qsfaf.fsf@codesourcery.com> <54921989.4060005@redhat.com> <54AADFA1.9040003@codesourcery.com> <54AD5BFC.2030906@redhat.com> In-Reply-To: <54AD5BFC.2030906@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-01/txt/msg00214.txt.bz2 On 01/07/2015 04:17 PM, Pedro Alves wrote: > On 01/05/2015 07:01 PM, Breazeal, Don wrote: >>> # Start a set of programs running and then wait for a bit, to be sure >>> # that they can be attached to. Return a list of the processes' PIDs. >>> >>> proc spawn_wait_for_attach { executable_list } { >>> set pid_list {} >>> >>> + if ![can_spawn_for_attach] { >>> + error "can't spawn for attach with this target/board" >>> + } >> >> Should this be calling "error", or should it call something like >> "untested" or "unsupported", since it isn't expected to work in these cases? > > The idea is that all .exp files that use spawn_wait_for_attach > would have already checked can_spawn_for_attach early, and skipped the > tests if false. That makes is a test bug to see a call to > spawn_wait_for_attach if can_spawn_for_attach is false. > > I should have really split those hunks out to a separate patch and > added calls to can_spawn_for_attach in all tests that are using > spawn_wait_for_attach already. Like below. WDYT? > > (There are probably other attach tests that don't use > spawn_wait_for_attach that need the can_spawn_for_attach too. > We can do this incrementally.) I went ahead and pushed this to unblock the parent series. > gdb/testsuite/ > 2015-01-09 Pedro Alves > > * lib/gdb.exp (can_spawn_for_attach): New procedure. > (spawn_wait_for_attach): Error out if can_spawn_for_attach returns > false. > * gdb.base/attach.exp: Use can_spawn_for_attach instead of > checking whether the target board is remote. > * gdb.multi/multi-attach.exp: Likewise. > * gdb.python/py-sync-interp.exp: Likewise. > * gdb.server/ext-attach.exp: Likewise. > * gdb.python/py-prompt.exp: Use can_spawn_for_attach before the > tests that need to attach, instead of checking whether the target > board is remote at the top of the file. Thanks, Pedro Alves