From 500a6be1093c3a3ef1841519b3043c1ccecd3a1a Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 3 Oct 2014 23:18:57 +0200 Subject: [PATCH] [Patch v2.5 1/4] test/insert: add known broken tests for indexing failures --- 87/9ae4280a8ca29b7f3351c4451f1cc5549c55fb | 89 +++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 87/9ae4280a8ca29b7f3351c4451f1cc5549c55fb diff --git a/87/9ae4280a8ca29b7f3351c4451f1cc5549c55fb b/87/9ae4280a8ca29b7f3351c4451f1cc5549c55fb new file mode 100644 index 000000000..db937826e --- /dev/null +++ b/87/9ae4280a8ca29b7f3351c4451f1cc5549c55fb @@ -0,0 +1,89 @@ +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 17FF6431FBD + for ; Fri, 3 Oct 2014 14:19:41 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 gsb5fTA1INCS for ; + Fri, 3 Oct 2014 14:19:35 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C16AB431FC4 + for ; Fri, 3 Oct 2014 14:19:29 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1XaAG9-0000L7-Fl; Fri, 03 Oct 2014 18:19:29 -0300 +Received: (nullmailer pid 21175 invoked by uid 1000); Fri, 03 Oct 2014 + 21:19:08 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [Patch v2.5 1/4] test/insert: add known broken tests for indexing + failures +Date: Fri, 3 Oct 2014 23:18:57 +0200 +Message-Id: <1412371140-21051-2-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.0 +In-Reply-To: <1412371140-21051-1-git-send-email-david@tethera.net> +References: <1412371140-21051-1-git-send-email-david@tethera.net> +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: Fri, 03 Oct 2014 21:19:41 -0000 + +These tests are written with the assumption that we want all indexing +failures to be considered as failures by notmuch insert. +--- + test/T070-insert.sh | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/test/T070-insert.sh b/test/T070-insert.sh +index ea9db07..40a7636 100755 +--- a/test/T070-insert.sh ++++ b/test/T070-insert.sh +@@ -183,4 +183,26 @@ test_expect_code 1 "Invalid tags set exit code" \ + + notmuch config set new.tags $OLDCONFIG + ++# DUPLICATE_MESSAGE_ID is not tested here, because it should actually pass. ++ ++for code in OUT_OF_MEMORY XAPIAN_EXCEPTION FILE_NOT_EMAIL \ ++ READ_ONLY_DATABASE UPGRADE_REQUIRED; do ++gen_insert_msg ++cat < index-file-$code.gdb ++file notmuch ++set breakpoint pending on ++break notmuch_database_add_message ++commands ++return NOTMUCH_STATUS_$code ++continue ++end ++run ++EOF ++test_begin_subtest "error exit when add_message returns $code" ++test_subtest_known_broken ++gdb --batch-silent --return-child-result -x index-file-$code.gdb \ ++ --args notmuch insert < $gen_msg_filename ++test_expect_equal $? 1 ++done ++ + test_done +-- +2.1.0 + -- 2.26.2