From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 637B76DE27DD for ; Fri, 14 Jul 2017 11:04:36 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[AWL=0.010, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ok8h0VFEKIo0 for ; Fri, 14 Jul 2017 11:04:35 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id A784A6DE27D7 for ; Fri, 14 Jul 2017 11:04:35 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1dW4tv-00048G-5R; Fri, 14 Jul 2017 14:01:15 -0400 Received: (nullmailer pid 32222 invoked by uid 1000); Fri, 14 Jul 2017 18:04:30 -0000 From: David Bremner To: Daniel Kahn Gillmor , Notmuch Mail Subject: Re: [PATCH 1/2] Ensure that "notmuch reply" succeeds during testing. In-Reply-To: <87pod36j4t.fsf@fifthhorseman.net> References: <20170714130912.24777-1-dkg@fifthhorseman.net> <87wp7bcc64.fsf@tethera.net> <87pod36j4t.fsf@fifthhorseman.net> Date: Fri, 14 Jul 2017 15:04:30 -0300 Message-ID: <87fudyq4i9.fsf@tesseract.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2017 18:04:36 -0000 Daniel Kahn Gillmor writes: > On Fri 2017-07-14 11:42:43 -0300, David Bremner wrote: >> Daniel Kahn Gillmor writes: >>> -output=3D$(notmuch reply id:${gen_msg_id}) >>> +output=3D$(notmuch reply id:${gen_msg_id} || echo failed) >> >> I wonder if we're going to touch this code if we should DTRT=E2=84=A2 an= d switch >> to redirecting stdin and stderr to a file. Then when we have failures we >> will at least have a little bit more information, especially in user bug >> reports. > > redirecting stdin as well? i'm not sure what you'd do with stdin. > makes sense for for stderr, though i don't know the test suite well > enough to instrument it The Right Way=E2=84=A2. I'm happy to be pointed = to an > example, though. err. stdout. I guess I was thinking something like the test "List all items" in T030-config.sh. Alternatively, it's simpler to add 2>&1 (see e.g. T050-new.sh) inside the $(). Maybe something like (untested) output=3D$(notmuch reply id:${gen_msg_id} 2>&1 && echo OK) to have postive confirmation of the exit value, as well as any stderr output. d