From d003d9c91513f79e5eb5a1aa04ec53615be5bb93 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 16:55:08 -1000 Subject: Give the symlink cycle a scan directory of its own The expected count of 2 held only because earlier tests had made a.git and b.git and one of them had dropped b.git's cgitrc. --- tests/t0303-robustness.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 49e88ad..5ed40ba 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -236,9 +236,17 @@ test_expect_success 'with trust-scan-config the same repository serves html' ' ' test_expect_success SYMLINKS 'a symlink cycle under the scan path is entered once' ' - ln -s . scan/loop && - cgit_rc gitcfgrc "url=" >tmp && - test $(grep -c "toplevel-repo" tmp) = 2 + mkdir loopscan && + git clone -q --bare repos/rob/.git loopscan/r.git && + ln -s . loopscan/loop && + { + echo "virtual-root=/" && + echo "cache-size=0" && + echo "scan-path=$PWD/loopscan" + } >looprc && + cgit_ok looprc "url=" >tmp && + test_grep "r.git" tmp && + test $(grep -c "" tmp) = 1 ' test_expect_success 'a bare query parameter does not swallow the next one' ' -- cgit 2.12.1