[PATCH] test: don't use dump and restore in a pipeline
authorDavid Bremner <david@tethera.net>
Tue, 28 Jun 2016 08:24:07 +0000 (10:24 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:08 +0000 (16:22 -0700)
90/2768736553ea98340a84fa071a89ce94cf4634 [new file with mode: 0644]

diff --git a/90/2768736553ea98340a84fa071a89ce94cf4634 b/90/2768736553ea98340a84fa071a89ce94cf4634
new file mode 100644 (file)
index 0000000..3e3f5ed
--- /dev/null
@@ -0,0 +1,79 @@
+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 BA5536DE014D\r
+ for <notmuch@notmuchmail.org>; Tue, 28 Jun 2016 01:24:28 -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 EJkr4XJkMLnn for <notmuch@notmuchmail.org>;\r
+ Tue, 28 Jun 2016 01:24:20 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 5F8C96DE00CC\r
+ for <notmuch@notmuchmail.org>; Tue, 28 Jun 2016 01:24:20 -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 1bHoJN-0006VR-MU; Tue, 28 Jun 2016 04:24:01 -0400\r
+Received: (nullmailer pid 27839 invoked by uid 1000);\r
+ Tue, 28 Jun 2016 08:24:15 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] test: don't use dump and restore in a pipeline\r
+Date: Tue, 28 Jun 2016 10:24:07 +0200\r
+Message-Id: <1467102247-27791-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 08:24:28 -0000\r
+\r
+This has been wrong since bbbdf0478ea, but the race condition was not\r
+previously been (often?) triggered in the tests. With the DB_RETRY_LOCK\r
+patches, it manifests itself as a deadlock.\r
+---\r
+ test/T240-dump-restore.sh | 6 ++++--\r
+ 1 file changed, 4 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh\r
+index bbfb09b..faa1036 100755\r
+--- a/test/T240-dump-restore.sh\r
++++ b/test/T240-dump-restore.sh\r
+@@ -135,7 +135,8 @@ test_expect_equal_file EXPECTED OUT\r
\r
+ test_begin_subtest "format=batch-tag, # round-trip"\r
+ notmuch dump --format=sup | sort > EXPECTED.$test_count\r
+-notmuch dump --format=batch-tag | notmuch restore --format=batch-tag\r
++notmuch dump --format=batch-tag > DUMPFILE\r
++notmuch restore --format=batch-tag < DUMPFILE\r
+ notmuch dump --format=sup | sort > OUTPUT.$test_count\r
+ test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count\r
\r
+@@ -212,7 +213,8 @@ test_expect_equal_file EXPECTED OUTPUT.$test_count\r
\r
+ test_begin_subtest 'format=batch-tag, round trip with strange tags'\r
+ notmuch dump --format=batch-tag > EXPECTED.$test_count\r
+-notmuch dump --format=batch-tag | notmuch restore --format=batch-tag\r
++notmuch dump --format=batch-tag > DUMPFILE\r
++notmuch restore --format=batch-tag < DUMPFILE\r
+ notmuch dump --format=batch-tag > OUTPUT.$test_count\r
+ test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count\r
\r
+-- \r
+2.8.1\r
+\r