From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127766 invoked by alias); 31 Aug 2018 14:33:00 -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 127742 invoked by uid 89); 31 Aug 2018 14:33:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=quitting X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.146.7) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 Aug 2018 14:32:58 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 1B291E9DE for ; Fri, 31 Aug 2018 09:32:57 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id vkTpfXdGMRPojvkTpfxGqG; Fri, 31 Aug 2018 09:32:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3LXUFQ5la/aVYTDrKRcAFY5elKCEVXmZGwlzqWLjMcw=; b=aMBfD+G6AFdvg9fSSwNimsU56s Zfg4+Vx2bCYPNvx2C+mQElqCuOBWxd/lP8OnBDrhuCPenR6vRCTP27bG3kJsM/ENeH208he762hjk cePTM3NyatXq5VtI2hiyYnseN; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:57920 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fvkTo-00094I-Pg; Fri, 31 Aug 2018 09:32:56 -0500 From: Tom Tromey To: Gary Benson Cc: Sergio Durigan Junior , gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH v2] Indicate batch mode failures by exiting with nonzero status References: <1534934813-10188-1-git-send-email-gbenson@redhat.com> <8736uviosv.fsf@redhat.com> Date: Fri, 31 Aug 2018 14:33:00 -0000 In-Reply-To: (Gary Benson's message of "Fri, 31 Aug 2018 14:30:23 +0100") Message-ID: <87pnxy1u94.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-08/txt/msg00853.txt.bz2 >>>>> "Gary" == Gary Benson writes: Gary> Yes please! Is it failing on *every* platform? I looked in gdb.log.xz Gary> but there's no output from GDB, only the PASS/FAIL lines. So I don't Gary> really know what to do, I can't reproduce :/ It fails for me too. I ran with -v and saw this in the .log: RESULT = 11271 exp6 0 0 PASS: gdb.base/batch-exit-status.exp: -batch: [lindex $result 2] == 0 PASS: gdb.base/batch-exit-status.exp: -batch: $actual_status == $expect_status Quitting /home/tromey/gdb/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/tromey/gdb/build/gdb/testsuite/../data-directory doing kill, pid is 11271 Spawning /home/tromey/gdb/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/tromey/gdb/build/gdb/testsuite/../data-directory -batch -jslkflsdjlkfjlksdjf RESULT = 11271 exp6 0 0 PASS: gdb.base/batch-exit-status.exp: -batch -jslkflsdjlkfjlksdjf: [lindex $result 2] == 0 FAIL: gdb.base/batch-exit-status.exp: -batch -jslkflsdjlkfjlksdjf: $actual_status == $expect_status Quitting /home/tromey/gdb/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/tromey/gdb/build/gdb/testsuite/../data-directory doing kill, pid is 11271 Note how the PID doesn't change. I suspect that what is happening is that gdb_spawn_id isn't being reset, and so we're hitting this code in default_gdb_spawn: if [info exists gdb_spawn_id] { return 0 } Something has to unset this after each invocation. Maybe calling clear_gdb_spawn_id, but I don't know if that's best or if there should be something else. Tom