<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/T050-new.sh, branch 0.26</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.26</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.26'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2017-12-15T11:55:02Z</updated>
<entry>
<title>test: test regexp based new.ignore</title>
<updated>2017-12-15T11:55:02Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-10-14T13:16:28Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7354d6d8f6fe413097e4fe3dc450594f016334a9'/>
<id>urn:sha1:7354d6d8f6fe413097e4fe3dc450594f016334a9</id>
<content type='text'>
Just some basics.
</content>
</entry>
<entry>
<title>test: use $(dirname "$0") for sourcing test-lib.sh</title>
<updated>2017-10-20T22:52:49Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-09-25T20:38:19Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a863de1e43ee34f6f5794a2759fdceb287e851aa'/>
<id>urn:sha1:a863de1e43ee34f6f5794a2759fdceb287e851aa</id>
<content type='text'>
Don't assume the tests are always run from within the source tree.
</content>
</entry>
<entry>
<title>test: Fix T050-new.sh on some Travis CI machines</title>
<updated>2017-08-30T10:24:44Z</updated>
<author>
<name>Vladimir Panteleev</name>
<email>notmuch@thecybershadow.net</email>
</author>
<published>2017-08-17T17:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=95b82bb326eccbc9a1e683b5764b93795b166ca2'/>
<id>urn:sha1:95b82bb326eccbc9a1e683b5764b93795b166ca2</id>
<content type='text'>
On some system configurations, setting a breakpoint on the "add_file"
function then issuing "continue" in gdb causes the debugger to
seemingly jump over the add_file invocation. This results in a test
failure, as the "Handle files vanishing between scandir and add_file"
subtest expects add_file to be called and fail due to the vanishing
file. The compiler optimization level also plays a role - the problem
can be reproduced with CFLAGS having -O2 but not -Og.

This problem was observed manifesting as a test failure on Travis CI
configured with "dist: trusty" and "sudo: false". It was not
reproducible on a local Docker image of Travis' runtime environment,
so Travis' virtualization infrastructure likely plays a role as well.

* T050-new.sh: Breakpoint notmuch_database_add_message instead of
  add_file to the same effect, and avoid bad gdb behaviour on Travis
  CI.

Amended by db:

	s/notmuch_database_add_message/notmuch_database_index_file/

Somehow the wrapper function doesn't work as a breakpoint; perhaps due
to inlining.
</content>
</entry>
<entry>
<title>test: require test_begin_subtest before test_expect_code</title>
<updated>2017-03-09T13:03:40Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-02-26T13:43:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0497d695ca796c4d19ad5ec08788bbb1f400c58c'/>
<id>urn:sha1:0497d695ca796c4d19ad5ec08788bbb1f400c58c</id>
<content type='text'>
Unify the subtests by requiring test_begin_subtest before
test_expect_code. (Similar change for test_expect_success has already
been done.)

This increases clarity in the test scripts by having a separate line
for the start of the subtest with the heading, and makes it possible
to simplify the test infrastructure by making all subtests similar.
</content>
</entry>
<entry>
<title>test: allow user to choose which gdb to run tests with</title>
<updated>2017-01-08T14:50:28Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2017-01-07T09:47:27Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=95efe2d4849f218fffd232dd6e10011f0f837878'/>
<id>urn:sha1:95efe2d4849f218fffd232dd6e10011f0f837878</id>
<content type='text'>
The variable used for selecting gdb is TEST_GDB, consistent with
TEST_CC and TEST_EMACS{,CLIENT}.
</content>
</entry>
<entry>
<title>test: check the handling of files vanishing between scandir and indexing</title>
<updated>2016-12-03T11:18:49Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2016-11-27T09:59:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e682c8f8f84fe5f7af30280bd8ea437772e154fa'/>
<id>urn:sha1:e682c8f8f84fe5f7af30280bd8ea437772e154fa</id>
<content type='text'>
Add a file for scandir to find, but use gdb to remove it before it
gets indexed.
</content>
</entry>
<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>
</feed>
