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