From 23fe043871c23ae1b919c185489ba945fd188cb5 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Tue, 28 Jun 2016 10:24:07 +0200 Subject: [PATCH] [PATCH] test: don't use dump and restore in a pipeline --- 90/2768736553ea98340a84fa071a89ce94cf4634 | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 90/2768736553ea98340a84fa071a89ce94cf4634 diff --git a/90/2768736553ea98340a84fa071a89ce94cf4634 b/90/2768736553ea98340a84fa071a89ce94cf4634 new file mode 100644 index 000000000..3e3f5eddb --- /dev/null +++ b/90/2768736553ea98340a84fa071a89ce94cf4634 @@ -0,0 +1,79 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id BA5536DE014D + for ; Tue, 28 Jun 2016 01:24:28 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.005 +X-Spam-Level: +X-Spam-Status: No, score=-0.005 tagged_above=-999 required=5 + tests=[AWL=-0.006, HEADER_FROM_DIFFERENT_DOMAINS=0.001] + 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 EJkr4XJkMLnn for ; + Tue, 28 Jun 2016 01:24:20 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 5F8C96DE00CC + for ; Tue, 28 Jun 2016 01:24:20 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1bHoJN-0006VR-MU; Tue, 28 Jun 2016 04:24:01 -0400 +Received: (nullmailer pid 27839 invoked by uid 1000); + Tue, 28 Jun 2016 08:24:15 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH] test: don't use dump and restore in a pipeline +Date: Tue, 28 Jun 2016 10:24:07 +0200 +Message-Id: <1467102247-27791-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.8.1 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Tue, 28 Jun 2016 08:24:28 -0000 + +This has been wrong since bbbdf0478ea, but the race condition was not +previously been (often?) triggered in the tests. With the DB_RETRY_LOCK +patches, it manifests itself as a deadlock. +--- + test/T240-dump-restore.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh +index bbfb09b..faa1036 100755 +--- a/test/T240-dump-restore.sh ++++ b/test/T240-dump-restore.sh +@@ -135,7 +135,8 @@ test_expect_equal_file EXPECTED OUT + + test_begin_subtest "format=batch-tag, # round-trip" + notmuch dump --format=sup | sort > EXPECTED.$test_count +-notmuch dump --format=batch-tag | notmuch restore --format=batch-tag ++notmuch dump --format=batch-tag > DUMPFILE ++notmuch restore --format=batch-tag < DUMPFILE + notmuch dump --format=sup | sort > OUTPUT.$test_count + test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count + +@@ -212,7 +213,8 @@ test_expect_equal_file EXPECTED OUTPUT.$test_count + + test_begin_subtest 'format=batch-tag, round trip with strange tags' + notmuch dump --format=batch-tag > EXPECTED.$test_count +-notmuch dump --format=batch-tag | notmuch restore --format=batch-tag ++notmuch dump --format=batch-tag > DUMPFILE ++notmuch restore --format=batch-tag < DUMPFILE + notmuch dump --format=batch-tag > OUTPUT.$test_count + test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count + +-- +2.8.1 + -- 2.26.2