unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: Re: batch 6, API exception handling cleanup.
Date: Thu, 23 Jul 2020 07:51:35 -0300	[thread overview]
Message-ID: <874kpyo66g.fsf@tethera.net> (raw)
In-Reply-To: <20200718150751.4106125-1-david@tethera.net>

David Bremner <david@tethera.net> writes:

> These follow the series at
>
>       id:20200714224119.717845-1-david@tethera.net
>
> Probably most interesting is 
>
>      [PATCH 10/10] test: add known broken test for indexing relative path
>
> That test is also part of the bug report
>           
>      id:87sgdqo0rz.fsf@tethera.net

Queued, with some minor updates:

diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh
index d2749a80..e64f0f12 100755
--- a/test/T562-lib-database.sh
+++ b/test/T562-lib-database.sh
@@ -140,12 +140,14 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
         EXPECT0(notmuch_database_close (db));
         ret = notmuch_database_needs_upgrade (db);
         printf ("%d\n", ret == FALSE);
+        stat = NOTMUCH_STATUS_XAPIAN_EXCEPTION;
     }
 EOF
 cat <<EOF > EXPECTED
 == stdout ==
 1
 == stderr ==
+A Xapian exception occurred at lib/database.cc:XXX: Database has been closed
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
@@ -173,6 +175,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
         stat = notmuch_database_begin_atomic (db);
         printf ("%d\n", stat == NOTMUCH_STATUS_SUCCESS ||
                         stat == NOTMUCH_STATUS_XAPIAN_EXCEPTION);
+        stat = NOTMUCH_STATUS_SUCCESS;
     }
 EOF
 cat <<EOF > EXPECTED
@@ -190,6 +193,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
         stat = notmuch_database_end_atomic (db);
         printf ("%d\n", stat == NOTMUCH_STATUS_SUCCESS ||
                         stat == NOTMUCH_STATUS_XAPIAN_EXCEPTION);
+        stat = NOTMUCH_STATUS_SUCCESS;
     }
 EOF
 cat <<EOF > EXPECTED
@@ -234,7 +238,6 @@ A Xapian exception occurred creating a directory: Database has been closed.
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
-# XXX TODO: test with relative path
 test_begin_subtest "index file with a closed db"
 cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
     {

      parent reply	other threads:[~2020-07-23 10:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18 15:07 batch 6, API exception handling cleanup David Bremner
2020-07-18 15:07 ` [PATCH 01/10] test: regression test for closing a closed database David Bremner
2020-07-18 15:07 ` [PATCH 02/10] test: add regression tests for notmuch database destroy David Bremner
2020-07-18 15:07 ` [PATCH 03/10] test: add known broken test for n_d_needs_upgrade David Bremner
2020-07-18 15:07 ` [PATCH 04/10] lib/n_d_needs_upgrade: handle error return from n_d_get_version David Bremner
2020-07-18 15:07 ` [PATCH 05/10] test: regression test for n_d_upgrade David Bremner
2020-07-18 15:07 ` [PATCH 06/10] test: add regression test for n_d_{begin,end}_atomic David Bremner
2020-07-18 15:07 ` [PATCH 07/10] test: regression test for n_d_get_revision David Bremner
2020-07-18 15:07 ` [PATCH 08/10] test: add regression test for n_d_get_directory David Bremner
2020-07-18 15:07 ` [PATCH 09/10] test: regression test for n_d_index_file closed db David Bremner
2020-07-18 15:07 ` [PATCH 10/10] test: add known broken test for indexing relative path David Bremner
2020-07-19 10:05   ` [PATCH] lib: convert relative filenames to absolute in n_d_index_file David Bremner
2020-07-25 11:17   ` [PATCH 10/10] test: add known broken test for indexing relative path David Bremner
2020-07-23 10:51 ` David Bremner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kpyo66g.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).