diff mbox series

[v3,25/34] t/perf: avoid copying builtin fsmonitor files into test repo

Message ID a83485fb10f57326a725579f329b73ebf9240ac6.1625150864.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Builtin FSMonitor Feature | expand

Commit Message

Jeff Hostetler July 1, 2021, 2:47 p.m. UTC
From: Jeff Hostetler <jeffhost@microsoft.com>

Do not try to copy a fsmonitor--daemon socket from the current
development directory into the test trash directory.

When we run the perf suite without an explicit source repo set,
we copy of the current $GIT_DIR into the test trash directory.
Unix domain sockets cannot be copied in that manner, so the test
setup fails.

Additionally, omit any other fsmonitor--daemon temp files inside
the $GIT_DIR directory.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
---
 t/perf/perf-lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ævar Arnfjörð Bjarmason July 1, 2021, 11:11 p.m. UTC | #1
On Thu, Jul 01 2021, Jeff Hostetler via GitGitGadget wrote:

> From: Jeff Hostetler <jeffhost@microsoft.com>
>
> Do not try to copy a fsmonitor--daemon socket from the current
> development directory into the test trash directory.

Okey, the */fsmonitor--daemon* rule covers that...

> When we run the perf suite without an explicit source repo set,
> we copy of the current $GIT_DIR into the test trash directory.
> Unix domain sockets cannot be copied in that manner, so the test
> setup fails.
>
> Additionally, omit any other fsmonitor--daemon temp files inside
> the $GIT_DIR directory.

So is the "any other" also matched by that rule? Not knowing the files
part of this is just phrasing, would be less confusing (if that's true,
and you didn't just forget to add a match for them) as:

    The */fsmonitor--daemon* glob will also match temporary files the
    daemon creates, but that's OK. We'd like to ignore these too.
diff mbox series

Patch

diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index 601d9f67ddb..3b97e3fc0f2 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -74,7 +74,7 @@  test_perf_copy_repo_contents () {
 	for stuff in "$1"/*
 	do
 		case "$stuff" in
-		*/objects|*/hooks|*/config|*/commondir|*/gitdir|*/worktrees)
+		*/objects|*/hooks|*/config|*/commondir|*/gitdir|*/worktrees|*/fsmonitor--daemon*)
 			;;
 		*)
 			cp -R "$stuff" "$repo/.git/" || exit 1