1 Return-Path: <thomas@schwinge.name>
\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 7BE6A431FB6
\r
6 for <notmuch@notmuchmail.org>; Wed, 2 Feb 2011 15:58:25 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id Is6vxZGLxOuT for <notmuch@notmuchmail.org>;
\r
16 Wed, 2 Feb 2011 15:58:25 -0800 (PST)
\r
17 Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de
\r
19 by olra.theworths.org (Postfix) with ESMTP id C333B431FB5
\r
20 for <notmuch@notmuchmail.org>; Wed, 2 Feb 2011 15:58:24 -0800 (PST)
\r
21 Received: from [87.180.46.33] (helo=stokes.schwinge.homeip.net)
\r
22 by smtprelay03.ispgateway.de with esmtpa (Exim 4.68)
\r
23 (envelope-from <thomas@schwinge.name>) id 1PkmZl-0000PV-Vh
\r
24 for notmuch@notmuchmail.org; Thu, 03 Feb 2011 00:57:30 +0100
\r
25 Received: (qmail 7026 invoked from network); 2 Feb 2011 23:57:10 -0000
\r
26 Received: from schwinge.homeip.net (87.180.46.33)
\r
27 by stokes.schwinge.homeip.net with QMQP; 2 Feb 2011 23:57:10 -0000
\r
28 Received: (nullmailer pid 16859 invoked by uid 1000);
\r
29 Wed, 02 Feb 2011 23:57:09 -0000
\r
30 From: Thomas Schwinge <thomas@schwinge.name>
\r
31 To: notmuch@notmuchmail.org
\r
32 Subject: [PATCH 1/2] New test: Emacs' forgetfulness.
\r
33 Date: Thu, 3 Feb 2011 00:56:38 +0100
\r
34 Message-Id: <1296690999-16542-2-git-send-email-thomas@schwinge.name>
\r
35 X-Mailer: git-send-email 1.7.1
\r
36 In-Reply-To: <87zkqeiffj.fsf@kepler.schwinge.homeip.net>
\r
37 References: <87zkqeiffj.fsf@kepler.schwinge.homeip.net>
\r
38 X-Df-Sender: thomas@schwinge.name
\r
39 Cc: Thomas Schwinge <thomas@schwinge.name>
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Wed, 02 Feb 2011 23:58:25 -0000
\r
54 Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
\r
56 test/emacs-forgetfulness | 38 ++++++++++++++++++++++++++++++++++++++
\r
57 test/notmuch-test | 1 +
\r
58 2 files changed, 39 insertions(+), 0 deletions(-)
\r
59 create mode 100755 test/emacs-forgetfulness
\r
61 diff --git a/test/emacs-forgetfulness b/test/emacs-forgetfulness
\r
62 new file mode 100755
\r
63 index 0000000..e17b26f
\r
65 +++ b/test/emacs-forgetfulness
\r
69 +test_description=Emacs\'\ forgetfulness
\r
73 +# RFC822 imposes a 998 character limit per line.
\r
75 +x=$x$x$x$x$x$x$x$x$x$x # 100
\r
76 +x=$x$x$x$x$x$x$x$x$x # 900
\r
78 +# If setting this ``too high'' (TODO: yet to be determined), Emacs will crash
\r
79 +# with a segmentation fault.
\r
81 +for i in $(seq 1 $n); do
\r
82 + # Roughly 2 KiB per message. That is, we need two messages in order to
\r
83 + # exceed the typical size of the pipe buffer (4 KiB on commodity systems).
\r
84 + generate_message [subject]=$i-$x [from]=$i-$x@x.x
\r
86 +# With 20 messages à 2 KiB, we have about 10 full pipe buffers, which should be
\r
87 +# enough to trigger the erroneous behavior.
\r
89 +notmuch new > /dev/null
\r
91 +test_begin_subtest 'Search for all messages'
\r
92 +output=$(exec 2>&1; \
\r
94 + <(notmuch search \* \
\r
96 + -e 's%^thread:[0-9a-f]*\ %%' \
\r
98 + echo 'End of search results.'; \
\r
100 + <(test_emacs 2>&1 \
\r
101 + '(notmuch-search "*") (notmuch-test-wait) (message (buffer-string))'))
\r
102 +test_expect_equal "$output" ''
\r
105 diff --git a/test/notmuch-test b/test/notmuch-test
\r
106 index 9d77c0f..2f11eac 100755
\r
107 --- a/test/notmuch-test
\r
108 +++ b/test/notmuch-test
\r
109 @@ -36,6 +36,7 @@ TESTS="
\r
113 + emacs-forgetfulness
\r
116 # Clean up any results from a previous run
\r