From: Mirko Faina <mroik@delayed.space>
To: git@vger.kernel.org
Cc: Mirko Faina <mroik@delayed.space>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2] t0008: improve test cleanup to fix failing test
Date: Mon, 16 Mar 2026 02:15:42 +0100 [thread overview]
Message-ID: <20260316011544.13825-1-mroik@delayed.space> (raw)
In-Reply-To: <20260315034851.2261530-1-mroik@delayed.space>
The "large exclude file ignored in tree" test fails. This is due to an
additional warning message that is generated in the test. "warning:
unable to access 'subdir/.gitignore': Too many levels of symbolic
links", the extra warning that is not supposed to be there, happens
because of some leftover files left by previous tests.
To fix this we improve cleanup on "symlinks not respected in-tree", and
because the tests in t0008 in general have poor cleanup, at the start of
"large exclude file ignored in tree" we search for any leftover
.gitignore and remove them before starting the test.
Improve post-test cleanup and add pre-test cleanup to make sure that we
have a workable environment for the test.
Signed-off-by: Mirko Faina <mroik@delayed.space>
---
Sorry again for the poorly written commit message in the previous patch.
t/t0008-ignores.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
index db8bde280e..e716b5cdfa 100755
--- a/t/t0008-ignores.sh
+++ b/t/t0008-ignores.sh
@@ -946,7 +946,7 @@ test_expect_success SYMLINKS 'symlinks respected in info/exclude' '
'
test_expect_success SYMLINKS 'symlinks not respected in-tree' '
- test_when_finished "rm .gitignore" &&
+ test_when_finished "rm -rf subdir .gitignore err actual" &&
ln -s ignore .gitignore &&
mkdir subdir &&
ln -s ignore subdir/.gitignore &&
@@ -957,6 +957,7 @@ test_expect_success SYMLINKS 'symlinks not respected in-tree' '
test_expect_success EXPENSIVE 'large exclude file ignored in tree' '
test_when_finished "rm .gitignore" &&
+ find . -name .gitignore -exec rm "{}" ";" &&
dd if=/dev/zero of=.gitignore bs=101M count=1 &&
git ls-files -o --exclude-standard 2>err &&
echo "warning: ignoring excessively large pattern file: .gitignore" >expect &&
--
2.53.0.959.g497ff81fa9
next prev parent reply other threads:[~2026-03-16 1:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-15 3:48 [PATCH] t0008: fix "large exclude file ignored in tree" Mirko Faina
2026-03-15 5:50 ` Junio C Hamano
2026-03-15 8:50 ` Mirko Faina
2026-03-15 16:04 ` Junio C Hamano
2026-03-16 1:15 ` Mirko Faina [this message]
2026-03-16 1:21 ` [PATCH v2] t0008: improve test cleanup to fix failing test Mirko Faina
2026-03-16 19:48 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260316011544.13825-1-mroik@delayed.space \
--to=mroik@delayed.space \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox