Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / a6 / 818cea850f5f6ddefb4f79af472b9c01421b51
1 Return-Path: <markwalters1009@gmail.com>\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 olra.theworths.org (Postfix) with ESMTP id 44B9E431FBC\r
6         for <notmuch@notmuchmail.org>; Fri,  9 Nov 2012 10:58:27 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id 4IoFNitdmirq for <notmuch@notmuchmail.org>;\r
18         Fri,  9 Nov 2012 10:58:26 -0800 (PST)\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
20         [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 8B84F431FB6\r
23         for <notmuch@notmuchmail.org>; Fri,  9 Nov 2012 10:58:26 -0800 (PST)\r
24 Received: by mail-we0-f181.google.com with SMTP id u54so2100442wey.26\r
25         for <notmuch@notmuchmail.org>; Fri, 09 Nov 2012 10:58:25 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=Y5H9XJ7UkDa1lwFYiM9pdNkO6WG9JSzMJ8jOX4fhF7Y=;\r
29         b=jkvBdzmgvSiyImbrRDNPq6fkB2/Rj3lawHet1GQ65jALC+fkAGVagf9r64MDl3cFAL\r
30         IQFoHl1fBW0t/3WksgRLeRYrzm5sdAU05lrXM0HW4tbBGUsz4V98/VOpCswjsFqRW5J7\r
31         xt+nb8YfTlrtVjkFfzlwnRfESGfw8xjFzqpIxGMCd08CCvjNWK1O0ZK7nLw7wgwz9fVO\r
32         DWO+W9gJubIJInRChhRFNiIfVk94mEXT8YBL6IM5DKGXnNUknybtggwDPFiSYB0yNTVG\r
33         8wmPjZ6XM73ZXaXmIZfl3/DANMg6aORulYonGdpu3sTpLzd0xD9EuANLVHrNfRU+1FLT\r
34         Py7g==\r
35 Received: by 10.180.108.38 with SMTP id hh6mr4220118wib.0.1352487505193;\r
36         Fri, 09 Nov 2012 10:58:25 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPS id fg6sm3340102wib.3.2012.11.09.10.58.23\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Fri, 09 Nov 2012 10:58:24 -0800 (PST)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH 1/3] test: test for race when tagging from emacs search\r
44 Date: Fri,  9 Nov 2012 18:58:09 +0000\r
45 Message-Id: <1352487491-31512-2-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 In-Reply-To: <1352487491-31512-1-git-send-email-markwalters1009@gmail.com>\r
48 References: <1352487491-31512-1-git-send-email-markwalters1009@gmail.com>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Fri, 09 Nov 2012 18:58:27 -0000\r
62 \r
63 When tagging from search view in emacs there is a race condition: it\r
64 tags all messages in the thread even ones which arrived after the\r
65 search was made. This can cause dataloss (if, for example, a thread is\r
66 archived it could archive messages the user has never seen).\r
67 \r
68 Mark this test known broken.\r
69 ---\r
70  test/emacs |   23 +++++++++++++++++++++++\r
71  1 files changed, 23 insertions(+), 0 deletions(-)\r
72 \r
73 diff --git a/test/emacs b/test/emacs\r
74 index 44f641e..6246177 100755\r
75 --- a/test/emacs\r
76 +++ b/test/emacs\r
77 @@ -122,6 +122,29 @@ test_emacs "(notmuch-search \"$os_x_darwin_thread\")\r
78  output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)\r
79  test_expect_equal "$output" "thread:XXX   2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)"\r
80  \r
81 +test_begin_subtest "Tag all matching messages from search view"\r
82 +test_subtest_known_broken\r
83 +notmuch tag +test-tag-race from:cworth\r
84 +test_emacs "(notmuch-search \"tag:test-tag-race\")\r
85 +           (notmuch-test-wait)"\r
86 +notmuch tag +test-tag-race "id:1258471718-6781-2-git-send-email-dottedmag@dottedmag.net"\r
87 +test_emacs "(execute-kbd-macro \"*+test-tag-race-2\")"\r
88 +output=$(notmuch count tag:test-tag-race-2)\r
89 +test_expect_equal "$output" "12"\r
90 +notmuch tag -test-tag-race '*'\r
91 +notmuch tag -test-tag-race-2 '*'\r
92 +\r
93 +test_begin_subtest "Change tags from search view: another message arriving after thread lookup"\r
94 +test_subtest_known_broken\r
95 +typsos_id="878we4qdqf.fsf@yoom.home.cworth.org"\r
96 +typsos_thread=$(notmuch search --output=threads id:$typsos_id)\r
97 +test_emacs "(notmuch-search \"$typsos_thread\")\r
98 +           (notmuch-test-wait)"\r
99 +add_message "[subject]=\"new-thread-message\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"new-thread-message\"" "[in-reply-to]=\"<$typsos_id>\""\r
100 +test_emacs "(execute-kbd-macro \"+tag-from-search-view -unread\")"\r
101 +output=$(notmuch search tag:tag-from-search-view | notmuch_search_sanitize)\r
102 +test_expect_equal "$output" "thread:XXX   2009-11-18 [2/3] Ingmar Vanhassel, Carl Worth| Notmuch Test Suite; [notmuch] [PATCH] Typsos (inbox tag-from-search-view unread)"\r
103 +\r
104  test_begin_subtest "Add tag from notmuch-show view"\r
105  test_emacs "(notmuch-show \"$os_x_darwin_thread\")\r
106             (execute-kbd-macro \"+tag-from-show-view\")"\r
107 -- \r
108 1.7.9.1\r
109 \r