[PATCH v2 1/2] test: Test notmuch new with a broken symlink
authorAustin Clements <amdragon@MIT.EDU>
Mon, 7 May 2012 22:20:39 +0000 (18:20 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:59 +0000 (09:46 -0800)
4f/4386123ba5f7cbce5dc5ccd43e8d96e03751d0 [new file with mode: 0644]

diff --git a/4f/4386123ba5f7cbce5dc5ccd43e8d96e03751d0 b/4f/4386123ba5f7cbce5dc5ccd43e8d96e03751d0
new file mode 100644 (file)
index 0000000..af558a6
--- /dev/null
@@ -0,0 +1,101 @@
+Return-Path: <amthrax@drake.mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7B40A431FD8\r
+       for <notmuch@notmuchmail.org>; Mon,  7 May 2012 15:20:49 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id vzt9FgMq-rF2 for <notmuch@notmuchmail.org>;\r
+       Mon,  7 May 2012 15:20:49 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+       [18.9.25.14])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7F2BB431FBC\r
+       for <notmuch@notmuchmail.org>; Mon,  7 May 2012 15:20:48 -0700 (PDT)\r
+X-AuditID: 1209190e-b7fd86d0000008b4-cf-4fa84ac00b1b\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 74.07.02228.0CA48AF4; Mon,  7 May 2012 18:20:48 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q47MKlio009638; \r
+       Mon, 7 May 2012 18:20:47 -0400\r
+Received: from drake.mit.edu (26-4-166.dynamic.csail.mit.edu [18.26.4.166])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q47MKjsc006041\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 7 May 2012 18:20:46 -0400 (EDT)\r
+Received: from amthrax by drake.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amthrax@drake.mit.edu>)\r
+       id 1SRWIP-0000JX-QZ; Mon, 07 May 2012 18:20:45 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 1/2] test: Test notmuch new with a broken symlink\r
+Date: Mon,  7 May 2012 18:20:39 -0400\r
+Message-Id: <1336429240-1114-2-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10\r
+In-Reply-To: <1336429240-1114-1-git-send-email-amdragon@mit.edu>\r
+References: <1336414186-15293-1-git-send-email-amdragon@mit.edu>\r
+       <1336429240-1114-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixCmqrXvAa4W/wdpvLBbXb85ktphxfheL\r
+       A5PHs1W3mD2WHf3JGMAUxWWTkpqTWZZapG+XwJXx+d1B5oLfrBVzOq4wNzB+Z+li5OSQEDCR\r
+       mP78AROELSZx4d56ti5GLg4hgX2MEs9fHGOEcNYzSvxq2gCVOcYk8bbhDJQzn1Fi6edfYLPY\r
+       BDQktu1fzghiiwhIS+y8O5sVxGYW8JQ48G0aWFxYwEVi77f97CA2i4CqxIJtTcwgNq+AvcTL\r
+       yX+gbpKXeHq/D2gBBwengIPE+0v2IGEhgTKJt5f/MU1g5F/AyLCKUTYlt0o3NzEzpzg1Wbc4\r
+       OTEvL7VI11gvN7NELzWldBMjOJQk+XYwfj2odIhRgINRiYdX6cVyfyHWxLLiytxDjJIcTEqi\r
+       vLbAQBTiS8pPqcxILM6ILyrNSS0+xCjBwawkwtsmBpTjTUmsrEotyodJSXOwKInzqmm98xMS\r
+       SE8sSc1OTS1ILYLJynBwKEnwuoIMFSxKTU+tSMvMKUFIM3FwggznARpuD1LDW1yQmFucmQ6R\r
+       P8WoKCXOKw2SEABJZJTmwfXCYv0VozjQK8K8CiBVPMA0Adf9CmgwE9Dgzc+WgQwuSURISTUw\r
+       Svz9Y7Dz5UmTCd7X1N/mBR1iSqi4KfE2eN8k/mW39F+XZa84263lUbboyQfHtOgPec3WIjuE\r
+       726f82zCMolkgV/CbZMfse6eviO1KztaRfeMpcn/pYIb79yWnHD5z4w5YvL7FB4xWD5wv1nt\r
+       bd363NyvW/FritqO1pAF+YejROc0PjvxwmKSmxJLcUaioRZzUXEiAM9VBDbQAgAA\r
+Cc: Vladimir Marek <vlmarek@volny.cz>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 07 May 2012 22:20:49 -0000\r
+\r
+---\r
+ test/new |   10 ++++++++++\r
+ 1 file changed, 10 insertions(+)\r
+\r
+diff --git a/test/new b/test/new\r
+index 99f9913..26253db 100755\r
+--- a/test/new\r
++++ b/test/new\r
+@@ -136,6 +136,16 @@ output=$(NOTMUCH_NEW)\r
+ test_expect_equal "$output" "Added 1 new message to the database."\r
\r
\r
++test_begin_subtest "Broken symlink aborts"\r
++ln -s does-not-exist "${MAIL_DIR}/broken"\r
++output=$(NOTMUCH_NEW 2>&1)\r
++test_expect_equal "$output" \\r
++"Error reading directory /run/shm/nm/tmp.new/mail/broken: No such file or directory\r
++Note: A fatal error was encountered: Something went wrong trying to read or write a file\r
++No new mail."\r
++rm "${MAIL_DIR}/broken"\r
++\r
++\r
+ test_begin_subtest "New two-level directory"\r
\r
+ generate_message [dir]=two/levels\r
+-- \r
+1.7.10\r
+\r