From 6f3a9f886d9ae5eabb7e0c705e45ad33165b9bcc Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:17:47 -0700 Subject: Name the missing home without searching for one strace logs a call that names the path whether or not it succeeds, so a home that existed would still be caught, and cgit unsets HOME before git runs anyway. --- tests/t0302-home-access.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/t0302-home-access.sh b/tests/t0302-home-access.sh index df55e0d..925716e 100755 --- a/tests/t0302-home-access.sh +++ b/tests/t0302-home-access.sh @@ -26,16 +26,7 @@ strace true 2>/dev/null || { } test_no_home_access() { - # A home that happened to exist would be one git may legitimately - # read, leaving the check below with nothing to catch, so extend the - # path until nothing is there. - missing_home="/path/to/some/place/that/does/not/possibly/exist" - depth=0 - while test -d "$missing_home" - do - depth=$((depth + 1)) - missing_home="$missing_home/$depth" - done && + missing_home=/path/to/some/place/that/does/not/possibly/exist && strace \ -E HOME="$missing_home" \ -E CGIT_CONFIG="$PWD/cgitrc" \ -- cgit