unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: don't use dump and restore in a pipeline
@ 2016-06-28  8:24 David Bremner
  2016-06-29  7:09 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: David Bremner @ 2016-06-28  8:24 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] test: don't use dump and restore in a pipeline
  2016-06-28  8:24 [PATCH] test: don't use dump and restore in a pipeline David Bremner
@ 2016-06-29  7:09 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2016-06-29  7:09 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> 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.

pushed, to prepare for the DB_RETRY_LOCK patches

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-29  7:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-28  8:24 [PATCH] test: don't use dump and restore in a pipeline David Bremner
2016-06-29  7:09 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).