<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/T566-lib-message.sh, branch debian/unstable</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=debian%2Funstable</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=debian%2Funstable'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2023-07-21T10:41:50Z</updated>
<entry>
<title>test: support testing notmuch as installed</title>
<updated>2023-07-21T10:41:50Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2023-04-09T14:26:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ec26eeaeec87781dee7dbf720103a5bc9b6bba5d'/>
<id>urn:sha1:ec26eeaeec87781dee7dbf720103a5bc9b6bba5d</id>
<content type='text'>
We put some effort into testing the built copy rather than some
installed copy. On the other hand for people like packagers, testing
the installed copy is also of interest.

When NOTMUCH_TEST_INSTALLED is set to a nonempty value, tests do not
require a built notmuch tree or running configure.

Some of the tests marked as broken when running against installed
notmuch are probably fixable.
</content>
</entry>
<entry>
<title>lib/message: move xapian call inside try/catch block in _n_m_delete</title>
<updated>2022-12-27T15:59:46Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-12-04T02:28:57Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1d5d0ae68689e7b1d6b974e275f19371250c4b25'/>
<id>urn:sha1:1d5d0ae68689e7b1d6b974e275f19371250c4b25</id>
<content type='text'>
The call to delete_document can throw exceptions (and can happen in
practice [1]), so catch the exception and extract the error
message. As a side effect, also move the call to _n_m_has_term inside
the try/catch. This should not change anything as that function
already traps any Xapian exceptions.

[1]: id:wwuk039sk2p.fsf@chaotikum.eu
</content>
</entry>
<entry>
<title>test: add known broken test for exception handling in _n_m_delete</title>
<updated>2022-12-27T15:59:38Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-12-04T02:28:56Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=966f40086f36a5bf26d8c180cd34a01636971a84'/>
<id>urn:sha1:966f40086f36a5bf26d8c180cd34a01636971a84</id>
<content type='text'>
In [1], Thomas Schneider reported an uncaught Xapian exception when
running out of disk space. We generate the same exception via database
corruption.

[1]: id:wwuk039sk2p.fsf@chaotikum.eu
</content>
</entry>
<entry>
<title>lib: check for writable db in n_m_tags_maildir_flags</title>
<updated>2022-06-25T19:06:34Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-05-25T10:51:17Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=6f749dd24a1c8138a05ac92884e8cb71098c7f6e'/>
<id>urn:sha1:6f749dd24a1c8138a05ac92884e8cb71098c7f6e</id>
<content type='text'>
The database needs to be writable because the list of stored file
names will change in general.
</content>
</entry>
<entry>
<title>lib: add NOTMUCH_STATUS_CLOSED_DATABASE, use in _n_d_ensure_writable</title>
<updated>2022-06-25T19:06:18Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-05-25T10:51:16Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3f27cce71f9f154cb0c2134c32d41c31eb62a239'/>
<id>urn:sha1:3f27cce71f9f154cb0c2134c32d41c31eb62a239</id>
<content type='text'>
In order for a database to actually be writeable, it must be the case that it
is open, not just the correct type of Xapian object. By explicitely
checking, we are able to provide better error reporting, in particular
for the previously broken test in T566-lib-message.
</content>
</entry>
<entry>
<title>test: error handling for n_m_tags_to_maildir_flags</title>
<updated>2022-06-25T19:05:16Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-05-25T10:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8ade833ec2714c6f4fb2fcba0bc28b9c421907d5'/>
<id>urn:sha1:8ade833ec2714c6f4fb2fcba0bc28b9c421907d5</id>
<content type='text'>
The closed database case should fail gracefully, but currently it
segfaults.
</content>
</entry>
<entry>
<title>test: error handling in _n_message_{add,remove}_filename</title>
<updated>2022-06-25T15:55:02Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-05-23T23:39:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9e9d0e5ffcdb92e4051b10a8df0c093db1be5d42'/>
<id>urn:sha1:9e9d0e5ffcdb92e4051b10a8df0c093db1be5d42</id>
<content type='text'>
Use a closed database to force throwing a Xapian exception. Leave the
check vague to accomodate a potential explicit check for open database.
</content>
</entry>
<entry>
<title>test: _notmuch_message_remove_term catches exceptions.</title>
<updated>2022-06-25T15:55:02Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-05-23T23:38:56Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a581755fbbf4149c33740779a85f3ee1f11cd7e9'/>
<id>urn:sha1:a581755fbbf4149c33740779a85f3ee1f11cd7e9</id>
<content type='text'>
Unfortunately we can't differentiate between the two distinct error
conditions for Document::remove_term.
</content>
</entry>
<entry>
<title>lib/message: catch exceptions in _n_m_add_term</title>
<updated>2022-06-25T15:55:02Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-05-23T23:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f48d2e2ff89a7e0a413b29ca844b2c785063eb3d'/>
<id>urn:sha1:f48d2e2ff89a7e0a413b29ca844b2c785063eb3d</id>
<content type='text'>
Some code movement is needed to make sure the cache is only
invalidated when the Xapian operation succeeds.
</content>
</entry>
<entry>
<title>test: replace deprecated use of notmuch_database_open_verbose</title>
<updated>2022-05-29T10:36:32Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-05-21T18:06:29Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f6e7a9dde5a7d9c2fa390a15888704c31852a538'/>
<id>urn:sha1:f6e7a9dde5a7d9c2fa390a15888704c31852a538</id>
<content type='text'>
We need to do it some day, and it is a bit annoying to read
deprecation messages in broken tests.
</content>
</entry>
</feed>
