1 Return-Path: <dkg@fifthhorseman.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by arlo.cworth.org (Postfix) with ESMTP id D46BA6DE02DD
\r
6 for <notmuch@notmuchmail.org>; Sat, 2 Apr 2016 07:15:55 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.732 tagged_above=-999 required=5
\r
12 tests=[AWL=-0.732] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id z9Rk9reRS0wE for <notmuch@notmuchmail.org>;
\r
16 Sat, 2 Apr 2016 07:15:47 -0700 (PDT)
\r
17 Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])
\r
18 by arlo.cworth.org (Postfix) with ESMTP id B818C6DE02C2
\r
19 for <notmuch@notmuchmail.org>; Sat, 2 Apr 2016 07:15:47 -0700 (PDT)
\r
20 Received: from fifthhorseman.net (dhcp-a244.meeting.ietf.org [31.133.162.68])
\r
21 by che.mayfirst.org (Postfix) with ESMTPSA id 81238F99A
\r
22 for <notmuch@notmuchmail.org>; Sat, 2 Apr 2016 10:15:45 -0400 (EDT)
\r
23 Received: by fifthhorseman.net (Postfix, from userid 1000)
\r
24 id A4F441FD2C; Sat, 2 Apr 2016 11:15:41 -0300 (BRT)
\r
25 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
\r
26 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
27 Subject: [PATCH v2 2/7] verify during thread-breakage that messages are
\r
29 Date: Sat, 2 Apr 2016 11:15:36 -0300
\r
30 Message-Id: <1459606541-23889-2-git-send-email-dkg@fifthhorseman.net>
\r
31 X-Mailer: git-send-email 2.8.0.rc3
\r
32 In-Reply-To: <1459606541-23889-1-git-send-email-dkg@fifthhorseman.net>
\r
33 References: <1459445693-3900-1-git-send-email-dkg@fifthhorseman.net>
\r
34 <1459606541-23889-1-git-send-email-dkg@fifthhorseman.net>
\r
35 X-BeenThere: notmuch@notmuchmail.org
\r
36 X-Mailman-Version: 2.1.20
\r
38 List-Id: "Use and development of the notmuch mail system."
\r
39 <notmuch.notmuchmail.org>
\r
40 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
43 List-Post: <mailto:notmuch@notmuchmail.org>
\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
45 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
47 X-List-Received-Date: Sat, 02 Apr 2016 14:15:55 -0000
\r
49 One risk of fixes to the thread-breakage problem is that we could fail
\r
50 to remove the search term indexes entirely. These additional subtests
\r
51 should guard against that.
\r
53 test/T590-thread-breakage.sh | 17 +++++++++++++++++
\r
54 1 file changed, 17 insertions(+)
\r
56 diff --git a/test/T590-thread-breakage.sh b/test/T590-thread-breakage.sh
\r
57 index 704f504..f3e725c 100755
\r
58 --- a/test/T590-thread-breakage.sh
\r
59 +++ b/test/T590-thread-breakage.sh
\r
60 @@ -17,6 +17,7 @@ To: Bob <bob@example.net>
\r
61 Date: Thu, 31 Mar 2016 20:10:00 -0400
\r
63 This is the first message in the thread.
\r
68 @@ -32,10 +33,18 @@ To: Alice <alice@example.net>
\r
69 Date: Thu, 31 Mar 2016 20:15:00 -0400
\r
71 This is the second message in the thread.
\r
77 +test_subject_count() {
\r
78 + notmuch new >/dev/null
\r
79 + test_begin_subtest "${3:-looking for $2 instance of '$1'}"
\r
80 + count=$(notmuch count --output=threads "$1")
\r
81 + test_expect_equal "$count" "$2"
\r
84 test_thread_count() {
\r
85 notmuch new >/dev/null
\r
86 test_begin_subtest "${2:-Expecting $1 thread(s)}"
\r
87 @@ -47,17 +56,25 @@ test_thread_count 0 'There should be no threads initially'
\r
90 test_thread_count 1 'One message in: one thread'
\r
91 +test_subject_count apple 1
\r
92 +test_subject_count banana 0
\r
95 test_thread_count 1 'Second message in the same thread: one thread'
\r
96 +test_subject_count apple 1
\r
97 +test_subject_count banana 1
\r
99 rm -f ${MAIL_DIR}/cur/a
\r
100 test_thread_count 1 'First message removed: still only one thread'
\r
101 +test_subject_count apple 0
\r
102 +test_subject_count banana 1
\r
105 # this is known to fail (it shows 2 threads) because no "ghost
\r
106 # message" was created for message A when it was removed from the
\r
107 # index, despite message B still pointing to it.
\r
108 test_thread_count 1 'First message reappears: should return to the same thread'
\r
109 +test_subject_count apple 1
\r
110 +test_subject_count banana 1
\r