git/t/helper
Johannes Schindelin dc76852df2 fsmonitor: demonstrate that it is not refreshed after discard_index()
This one is tricky.

When `core.fsmonitor` is set, a `refresh_index()` will not perform a
full scan of files that might be modified, but will query the fsmonitor
and refresh only the ones that have been actually touched.

Due to implementation details, the fsmonitor is queried in
`refresh_cache_ent()`, but of course it only has to be queried once, so
we set a flag when we did that. But when the index was discarded, we did
not re-set that flag.

So far, this is only covered by our test suite when running with
GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all, and only due to the way the
built-in stash interacts with the recursive merge machinery.

Let's introduce a straight-forward regression test for this.

We simply extend the "read & discard index" loop in `test-tool
read-cache` to optionally refresh the index, report on a given file's
status, and then modify that file. Due to the bug described above, only
the first refresh will actually query the fsmonitor; subsequent loop
iterations will not.

This problem was reported by Ævar Arnfjörð Bjarmason.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-08 11:58:12 +09:00
..
.gitignore
test-chmtime.c
test-config.c
test-ctype.c
test-date.c Merge branch 'js/vsts-ci' 2019-02-06 22:05:26 -08:00
test-delta.c test-delta: read input into a heap buffer 2018-08-30 10:30:21 -07:00
test-drop-caches.c handle lower case drive letters on Windows 2018-07-12 12:11:05 -07:00
test-dump-cache-tree.c convert "oidcmp() != 0" to "!oideq()" 2018-08-29 11:32:49 -07:00
test-dump-fsmonitor.c cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch 2019-01-24 11:55:06 -08:00
test-dump-split-index.c
test-dump-untracked-cache.c cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch 2019-01-24 11:55:06 -08:00
test-example-decorate.c
test-fake-ssh.c
test-genrandom.c
test-genzeros.c tests: teach the test-tool to generate NUL bytes and use it 2019-02-19 10:22:21 -08:00
test-hash-speed.c t/helper: add a test helper to compute hash speed 2018-11-14 16:54:52 +09:00
test-hash.c t: make the sha1 test-tool helper generic 2018-11-14 16:54:52 +09:00
test-hashmap.c
test-index-version.c
test-json-writer.c json_writer: new routines to create JSON data 2018-07-16 13:55:39 -07:00
test-lazy-init-name-hash.c
test-line-buffer.c
test-match-trees.c
test-mergesort.c
test-mktemp.c
test-online-cpus.c
test-parse-options.c assert NOARG/NONEG behavior of parse-options callbacks 2018-11-06 12:56:29 +09:00
test-path-utils.c ci: parallelize testing on Windows 2019-01-29 09:26:47 -08:00
test-pkt-line.c t/helper: merge test-pkt-line into test-tool 2018-09-11 10:54:19 -07:00
test-prio-queue.c prio-queue: add 'peek' operation 2018-11-02 12:14:21 +09:00
test-reach.c test-reach: test get_reachable_subset 2018-11-03 00:12:06 +09:00
test-read-cache.c fsmonitor: demonstrate that it is not refreshed after discard_index() 2019-05-08 11:58:12 +09:00
test-read-midx.c multi-pack-index: store local property 2018-08-20 15:31:39 -07:00
test-ref-store.c Merge branch 'cc/test-ref-store-typofix' 2019-02-05 14:26:13 -08:00
test-regex.c
test-repository.c t/helper/test-repository: celebrate independence from the_repository 2018-12-28 10:06:33 -08:00
test-revision-walking.c revision.c: remove implicit dependency on the_index 2018-09-21 09:51:19 -07:00
test-run-command.c
test-scrap-cache-tree.c Merge branch 'ma/lockfile-cleanup' 2018-05-30 14:04:05 +09:00
test-sha1-array.c
test-sha1.c t: make the sha1 test-tool helper generic 2018-11-14 16:54:52 +09:00
test-sha1.sh
test-sha256.c Add a base implementation of SHA-256 support 2018-11-14 16:54:53 +09:00
test-sigchain.c style: the opening '{' of a function is in a separate line 2018-12-10 15:41:09 +09:00
test-strcmp-offset.c
test-string-list.c
test-submodule-config.c
test-submodule-nested-repo-config.c repository: repo_submodule_init to take a submodule struct 2018-12-05 11:42:32 +09:00
test-subprocess.c
test-svn-fe.c
test-tool.c tests: teach the test-tool to generate NUL bytes and use it 2019-02-19 10:22:21 -08:00
test-tool.h tests: teach the test-tool to generate NUL bytes and use it 2019-02-19 10:22:21 -08:00
test-urlmatch-normalization.c
test-wildmatch.c
test-windows-named-pipe.c t0051: test GIT_TRACE to a windows named pipe 2018-09-11 13:54:25 -07:00
test-write-cache.c Merge branch 'ma/lockfile-cleanup' 2018-05-30 14:04:05 +09:00
test-xml-encode.c tests: optionally write results as JUnit-style .xml 2019-01-29 09:26:46 -08:00