From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114134 invoked by alias); 9 Oct 2018 16:40:22 -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 114124 invoked by uid 89); 9 Oct 2018 16:40:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Oct 2018 16:40:20 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A0A7DB007; Tue, 9 Oct 2018 16:40:18 +0000 (UTC) Subject: Re: [PATCH][gdb/testsuite] Rewrite catch-follow-exec.exp To: Gary Benson Cc: gdb-patches@sourceware.org, Pedro Alves References: <20181005101122.GA23867@delia> <20181009135155.GB12668@blade.nx> From: Tom de Vries Message-ID: <8f8ffb94-5a0c-8b2b-d541-eaacd7d1f42c@suse.de> Date: Tue, 09 Oct 2018 16:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181009135155.GB12668@blade.nx> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00217.txt.bz2 On 10/9/18 3:51 PM, Gary Benson wrote: > Tom de Vries wrote: >> append FLAGS " \"$binfile\"" >> append FLAGS " -batch" >> + append FLAGS " -ex \"target native\"" >> append FLAGS " -ex \"catch exec\"" >> append FLAGS " -ex \"set follow-exec-mode new\"" > > I'm a little confused with this part, doesn't this force the test to > run on the host? > Hi, thanks for the review. The "target native" was an attempt to fix problems when running with --target_board=native-gdbserver. Perhaps it's better to bail out in that case, but I haven't yet figured out how to. Any advice here? >> + # We're not testing the "status returned by the spawned process", >> + # because it's currently one, and we suspect it will be zero after >> + # fixing PR23368 - "gdb goes to into background when hitting exec >> + # catchpoint with follow-exec-mode new" >> + #gdb_assert { [lindex $result 3] == 0 } > > I'm not sure we should commit commented-out code. Why not have the > test assert { [lindex $result 3] == 1 } if that's what's happening > now, with the comment reworded to indicate that it might need changing > to zero when PR23368 is fixed. That way, when PR23368 *is* fixed, > whoever's fixing it gets a failing test, they investigate, find the > comment, and update it as part of their series. > Makes sense, will do. Thanks, - Tom