From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106402 invoked by alias); 31 Aug 2018 13:30:46 -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 106180 invoked by uid 89); 31 Aug 2018 13:30:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=HX-Received:sk:u2-v6mr X-HELO: mail-yw1-f67.google.com Received: from mail-yw1-f67.google.com (HELO mail-yw1-f67.google.com) (209.85.161.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 Aug 2018 13:30:28 +0000 Received: by mail-yw1-f67.google.com with SMTP id w202-v6so5046063yww.3 for ; Fri, 31 Aug 2018 06:30:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a81:9a41:0:0:0:0:0 with HTTP; Fri, 31 Aug 2018 06:30:23 -0700 (PDT) In-Reply-To: <8736uviosv.fsf@redhat.com> References: <1534934813-10188-1-git-send-email-gbenson@redhat.com> <8736uviosv.fsf@redhat.com> From: Gary Benson Date: Fri, 31 Aug 2018 13:30:00 -0000 Message-ID: Subject: Re: [PATCH v2] Indicate batch mode failures by exiting with nonzero status To: Sergio Durigan Junior Cc: gdb-patches@sourceware.org, Tom Tromey Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00852.txt.bz2 On 30 August 2018 at 21:26, Sergio Durigan Junior wrote: > On Wednesday, August 22 2018, Gary Benson wrote: >> This patch causes GDB in batch mode to exit with nonzero status >> if the last command to be executed fails. >> >> Changes since version 1: >> - I've reworked the patch to not use a global variable. >> - Behaviour has not changed from version 1. >> >> Built and regtested on RHEL 7.5 x86_64. > > Hey, just to make sure this is reported here: I'm seeing failures when > running this test on my Fedora 28 x86_64: > > FAIL: gdb.base/batch-exit-status.exp: -batch -jslkflsdjlkfjlksdjf: $actual_status == $expect_status > FAIL: gdb.base/batch-exit-status.exp: -batch -ex "set not-a-thing 4": $actual_status == $expect_status > FAIL: gdb.base/batch-exit-status.exp: -batch -x /home/sergio/work/src/git/binutils-gdb/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/batch-exit-status.bad-commands: $actua$ > _status == $expect_status > FAIL: gdb.base/batch-exit-status.exp: -batch -x /home/sergio/work/src/git/binutils-gdb/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/batch-exit-status.good-commands -x /ho$ > e/sergio/work/src/git/binutils-gdb/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/batch-exit-status.bad-commands: $actual_status == $expect_status > FAIL: gdb.base/batch-exit-status.exp: -batch -x /home/sergio/work/src/git/binutils-gdb/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/batch-exit-status.good-commands -ex "s$ > t not-a-thing 4": $actual_status == $expect_status > > This has also been caught by the BuildBot: > > https://sourceware.org/ml/gdb-testers/2018-q3/msg05129.html > https://sourceware.org/ml/gdb-testers/2018-q3/msg05223.html > > Let me know if you need more details. Yes please! Is it failing on *every* platform? I looked in gdb.log.xz but there's no output from GDB, only the PASS/FAIL lines. So I don't really know what to do, I can't reproduce :/ Cheers, Gary