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 4A8866DE115F for ; Mon, 28 Nov 2016 14:12:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.006 X-Spam-Level: X-Spam-Status: No, score=-0.006 tagged_above=-999 required=5 tests=[AWL=0.005, 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 GA1NftTOSSqv for ; Mon, 28 Nov 2016 14:12:42 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 805D96DE11B3 for ; Mon, 28 Nov 2016 14:12:42 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1cBU9r-0000h6-7t; Mon, 28 Nov 2016 17:12:19 -0500 Received: (nullmailer pid 25587 invoked by uid 1000); Mon, 28 Nov 2016 22:12:37 -0000 From: David Bremner To: David Bremner , Maarten Aertsen , Notmuch Mail Cc: Tomi Ollila Subject: [PATCH 1/3] test: gdb insert: redirect input inside gdb script Date: Mon, 28 Nov 2016 18:12:29 -0400 Message-Id: <20161128221231.25528-2-david@tethera.net> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161128221231.25528-1-david@tethera.net> References: <20161128121641.4022-2-david@tethera.net> <20161128221231.25528-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Mon, 28 Nov 2016 22:12:43 -0000 From: Tomi Ollila Running `gdb command < input` is not as reliable way to give input to the command (some installations of gdb consume it). Use "set args" gdb command to have input redirected at gdb 'run' time. --- test/T070-insert.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index c2485bb..43b3abc 100755 --- a/test/T070-insert.sh +++ b/test/T070-insert.sh @@ -202,13 +202,15 @@ end run EOF test_begin_subtest "error exit when add_message returns $code" -gdb --batch-silent --return-child-result -x index-file-$code.gdb \ - --args notmuch insert < $gen_msg_filename +gdb --batch-silent --return-child-result \ + -ex "set args insert < $gen_msg_filename" \ + -x index-file-$code.gdb notmuch test_expect_equal $? 1 test_begin_subtest "success exit with --keep when add_message returns $code" -gdb --batch-silent --return-child-result -x index-file-$code.gdb \ - --args notmuch insert --keep < $gen_msg_filename +gdb --batch-silent --return-child-result \ + -ex "set args insert --keep < $gen_msg_filename" \ + -x index-file-$code.gdb notmuch test_expect_equal $? 0 done -- 2.10.2