<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/T050-new.sh, branch debian/stretch</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=debian%2Fstretch</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=debian%2Fstretch'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2016-04-12T23:40:19Z</updated>
<entry>
<title>lib: fix handling of one character long directory names at top level</title>
<updated>2016-04-12T23:40:19Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2016-04-10T19:43:22Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a352d9ceaa7e08b7c9de294419ec4c323b81ca15'/>
<id>urn:sha1:a352d9ceaa7e08b7c9de294419ec4c323b81ca15</id>
<content type='text'>
The code to skip multiple slashes in _notmuch_database_split_path()
skips back one character too much. This is compensated by a +1 in the
length parameter to the strndup() call. Mostly this works fine, but if
the path is to a file under a top level directory with one character
long name, the directory part is mistaken to be part of the file name
(slash == path in code). The returned directory name will be the empty
string and the basename will be the full path, breaking the indexing
logic in notmuch new.

Fix the multiple slash skipping to keep the slash variable pointing at
the last slash, and adjust strndup() accordingly.

The bug was introduced in

commit e890b0cf4011fd9fd77ebd87343379e4a778888b
Author: Carl Worth &lt;cworth@cworth.org&gt;
Date:   Sat Dec 19 13:20:26 2009 -0800

    database: Store the parent ID for each directory document.

just a little over two months after the initial commit in the Notmuch
code history, making this the longest living bug in Notmuch to date.
</content>
</entry>
<entry>
<title>test: test one character long directory names at top level</title>
<updated>2016-04-12T23:37:08Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2016-04-10T19:43:21Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0f6b399d5b2f925a75a69d7cda38dda5c67db7a1'/>
<id>urn:sha1:0f6b399d5b2f925a75a69d7cda38dda5c67db7a1</id>
<content type='text'>
Yes, it's broken. Reported by h01ger on IRC.
</content>
</entry>
<entry>
<title>test: cope with glass backend file naming variations</title>
<updated>2016-04-12T23:21:09Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2016-04-09T01:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e311aad182326a1dcb0f8512e10b0e0f0faa9e2c'/>
<id>urn:sha1:e311aad182326a1dcb0f8512e10b0e0f0faa9e2c</id>
<content type='text'>
In several places in the test suite we intentionally corrupt the Xapian
database in order to test error handling. This corruption is specific to
the on-disk organization of the database, and that changed with the
glass backend. We use the previously computed default backend to make
the tests adapt to changing names.
</content>
</entry>
<entry>
<title>cli: fix function name in notmuch new debug logging</title>
<updated>2015-12-30T15:28:30Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2015-11-03T19:49:29Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b645f416059f128ea49991745b648c7ffa045ccc'/>
<id>urn:sha1:b645f416059f128ea49991745b648c7ffa045ccc</id>
<content type='text'>
add_files_recursive has been renamed add_files long ago.
</content>
</entry>
<entry>
<title>cli: delete directory documents on directory removal</title>
<updated>2015-10-14T10:55:41Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2015-09-25T20:48:46Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e26d99dc7b02f33299c281f97a13deaef802bc7a'/>
<id>urn:sha1:e26d99dc7b02f33299c281f97a13deaef802bc7a</id>
<content type='text'>
There was a problem with the directory documents being left behind when
the filesystem directory was removed. This was worked around in [1].
However, that ignored the fact that the directory documents are also
still listed by notmuch_directory_get_child_directories() leading to
confusing results when running notmuch new. The directory documents are
found and queued for removal over and over again.

Fix the problem for real by removing the directory documents. This fixes
the tests flagged as broken in [2].

The (non-deterministic) hack test from [3] also still passes with this
change.

[1] commit acd66cdec075312944e527febd46382e54d99367
[2] commit ed9ceda623d3f22fb66365b33db63c5c982067d3
[3] id:1441445731-4362-1-git-send-email-jani@nikula.org
</content>
</entry>
<entry>
<title>test: flag one more notmuch new test as broken</title>
<updated>2015-10-10T12:13:02Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2015-09-25T20:48:44Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0e03ff389443aa062d30e6949bb3220563c474be'/>
<id>urn:sha1:0e03ff389443aa062d30e6949bb3220563c474be</id>
<content type='text'>
Drop the test update added in [1] and mark the test as broken, like the
tests flagged as broken in [2]. These all reflect the same underlying
breakage with (lack of) directory deletion.

[1] commit e4e04bbc328f990e36b77f508aef904d156029b1
[2] commit ed9ceda623d3f22fb66365b33db63c5c982067d3
</content>
</entry>
<entry>
<title>test: make script exit (1) if it "fails" to source (.) a file</title>
<updated>2015-08-07T19:56:39Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2015-08-06T09:13:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=02a2eeb427d6b424029f6e5e5ddad4c6ec987741'/>
<id>urn:sha1:02a2eeb427d6b424029f6e5e5ddad4c6ec987741</id>
<content type='text'>
The files (test) scripts source (with builtin command `.`) provides
information which the scripts depend, and without the `source` to
succeed allowing script to continue may lead to dangerous situations
(e.g. rm -rf "${undefined_variable}"/*).

At the end of all source (.) lines construct ' || exit 1' was added;
In our case the script script will exit if it cannot find (or read) the
file to be sourced. Additionally script would also exits if the last
command of the sourced file exited nonzero.
</content>
</entry>
<entry>
<title>test: add debugging output to notmuch-new tests, mark 5 as broken</title>
<updated>2015-08-04T19:00:09Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-08-04T06:48:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ed9ceda623d3f22fb66365b33db63c5c982067d3'/>
<id>urn:sha1:ed9ceda623d3f22fb66365b33db63c5c982067d3</id>
<content type='text'>
I marked the tests where I really couldn't understand the output as
broken. It could also be that I don't understand how directory removal
is supposed to work.
</content>
</entry>
<entry>
<title>cli/new: add more debugging output</title>
<updated>2015-08-04T18:59:58Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-08-04T06:48:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e4e04bbc328f990e36b77f508aef904d156029b1'/>
<id>urn:sha1:e4e04bbc328f990e36b77f508aef904d156029b1</id>
<content type='text'>
Try to narrow down what part of the code adds files and directories to
the queue(s) to be deleted.

Update one test. The output is slightly confusing, but I believe it is
correct, resulting from a directory being discovered but containing only ignored files.
</content>
</entry>
<entry>
<title>test: don't claim single message mbox support is going away</title>
<updated>2015-08-04T18:59:50Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-08-04T06:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e2fb06d369bf7a532b4438ab576ca2969a8882a3'/>
<id>urn:sha1:e2fb06d369bf7a532b4438ab576ca2969a8882a3</id>
<content type='text'>
We gave up on this.
</content>
</entry>
</feed>
