diff mbox series

[v2,3/8] t1301-shared-repo.sh: disable FSMONITOR

Message ID f9db0c3416ff50587bffe46bb00268d8094c1ad7.1575907804.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Improve testability with GIT_TEST_FSMONITOR | expand

Commit Message

Linus Arver via GitGitGadget Dec. 9, 2019, 4:09 p.m. UTC
From: Derrick Stolee <dstolee@microsoft.com>

The fsmonitor feature allows an external tool such as watchman to
monitor the working directory. The direct test
t7619-status-fsmonitor.sh provides some coverage, but it would be
better to run the entire test suite with watchman enabled. This
would provide more confidence that the feature is working as
intended.

The test t1301-shared-repo.sh would fail when GIT_TEST_FSMONITOR
is set to t/t7519/fsmonitor-watchman because it changes permissions
in an incompatible way.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
 t/t1301-shared-repo.sh | 1 +
 1 file changed, 1 insertion(+)

Comments

SZEDER Gábor Dec. 10, 2019, 9:43 a.m. UTC | #1
On Mon, Dec 09, 2019 at 04:09:59PM +0000, Derrick Stolee via GitGitGadget wrote:
> From: Derrick Stolee <dstolee@microsoft.com>
> 
> The fsmonitor feature allows an external tool such as watchman to
> monitor the working directory. The direct test
> t7619-status-fsmonitor.sh provides some coverage, but it would be
> better to run the entire test suite with watchman enabled. This
> would provide more confidence that the feature is working as
> intended.
> 
> The test t1301-shared-repo.sh would fail when GIT_TEST_FSMONITOR
> is set to t/t7519/fsmonitor-watchman because it changes permissions
> in an incompatible way.

I don't understand this, and would like it to be more specific, i.e.
which particular permission changes in which tests are incompatible
with watchman.

> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  t/t1301-shared-repo.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
> index 2dc853d1be..665ade0cf2 100755
> --- a/t/t1301-shared-repo.sh
> +++ b/t/t1301-shared-repo.sh
> @@ -128,6 +128,7 @@ test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
>  '
>  
>  test_expect_success POSIXPERM 'forced modes' '
> +	GIT_TEST_FSMONITOR="" &&

This is not in a subshell, so it disables GIT_TEST_FSMONITOR not only
for the test it is executed in but for the remainder of the test
script.  From the commit message I can't decide whether that's
intended.

>  	mkdir -p templates/hooks &&
>  	echo update-server-info >templates/hooks/post-update &&
>  	chmod +x templates/hooks/post-update &&
> -- 
> gitgitgadget
>
diff mbox series

Patch

diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
index 2dc853d1be..665ade0cf2 100755
--- a/t/t1301-shared-repo.sh
+++ b/t/t1301-shared-repo.sh
@@ -128,6 +128,7 @@  test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
 '
 
 test_expect_success POSIXPERM 'forced modes' '
+	GIT_TEST_FSMONITOR="" &&
 	mkdir -p templates/hooks &&
 	echo update-server-info >templates/hooks/post-update &&
 	chmod +x templates/hooks/post-update &&