[PATCH] test: make gdb even quieter
authorDavid Bremner <david@tethera.net>
Tue, 28 Jun 2016 21:08:54 +0000 (23:08 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:09 +0000 (16:22 -0700)
3a/bef985562c33c3b345322c6522c1bd66d923ab [new file with mode: 0644]

diff --git a/3a/bef985562c33c3b345322c6522c1bd66d923ab b/3a/bef985562c33c3b345322c6522c1bd66d923ab
new file mode 100644 (file)
index 0000000..e03c877
--- /dev/null
@@ -0,0 +1,87 @@
+Return-Path: <bremner@tesseract.cs.unb.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 72A766DE01D0\r
+ for <notmuch@notmuchmail.org>; Tue, 28 Jun 2016 14:09:14 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.005\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.005 tagged_above=-999 required=5\r
+ tests=[AWL=-0.006, HEADER_FROM_DIFFERENT_DOMAINS=0.001]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id BznLXPazRYRq for <notmuch@notmuchmail.org>;\r
+ Tue, 28 Jun 2016 14:09:06 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 121646DE00DA\r
+ for <notmuch@notmuchmail.org>; Tue, 28 Jun 2016 14:09:05 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+ id 1bI0FQ-0007dV-HT; Tue, 28 Jun 2016 17:08:44 -0400\r
+Received: (nullmailer pid 11794 invoked by uid 1000);\r
+ Tue, 28 Jun 2016 21:08:58 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] test: make gdb even quieter\r
+Date: Tue, 28 Jun 2016 23:08:54 +0200\r
+Message-Id: <1467148134-11748-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.8.1\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 28 Jun 2016 21:09:14 -0000\r
+\r
+gdb sometimes writes warnings to stdout, which we don't need/want, and\r
+for some reason --batch-silent isn't enough to hide. So in this commit\r
+we write them to a log file, which is probably better for debugging\r
+anyway. To see an illustrative test failure before this change, run\r
+\r
+% make\r
+% touch notmuch-count.c\r
+% cd test && ./T060-count.sh\r
+---\r
+ test/T060-count.sh  | 2 ++\r
+ test/T070-insert.sh | 2 ++\r
+ 2 files changed, 4 insertions(+)\r
+\r
+diff --git a/test/T060-count.sh b/test/T060-count.sh\r
+index 0ac8314..d6933a7 100755\r
+--- a/test/T060-count.sh\r
++++ b/test/T060-count.sh\r
+@@ -103,6 +103,8 @@ restore_database\r
\r
+ cat <<EOF > count-files.gdb\r
+ set breakpoint pending on\r
++set logging file count-files-gdb.log\r
++set logging on\r
+ break count_files\r
+ commands\r
+ shell cp /dev/null ${MAIL_DIR}/.notmuch/xapian/postlist.${db_ending}\r
+diff --git a/test/T070-insert.sh b/test/T070-insert.sh\r
+index e7ec6a6..c2485bb 100755\r
+--- a/test/T070-insert.sh\r
++++ b/test/T070-insert.sh\r
+@@ -192,6 +192,8 @@ for code in OUT_OF_MEMORY XAPIAN_EXCEPTION FILE_NOT_EMAIL \\r
+ gen_insert_msg\r
+ cat <<EOF > index-file-$code.gdb\r
+ set breakpoint pending on\r
++set logging file index-file-$code.log\r
++set logging on\r
+ break notmuch_database_add_message\r
+ commands\r
+ return NOTMUCH_STATUS_$code\r
+-- \r
+2.8.1\r
+\r