List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH v1] tests: fix test_no_home_access on riscv64
@ 2022-09-18  0:40 Peter Colberg
  0 siblings, 0 replies; only message in thread
From: Peter Colberg @ 2022-09-18  0:40 UTC (permalink / raw)
  To: cgit; +Cc: Peter Colberg, Sakura286, Paul Wise

On riscv64, access(2) does not exist and faccessat(2) is called with
the directory file descriptor set to AT_FDCWD, which behaves the
same as access(2). Trace access(2), faccessat(2), and faccessat2(2)
to ease porting to future architectures and do not fail if any of
these does not exist depending on architecture and kernel version.

Link: https://bugs.debian.org/1019369
Co-Developed-by: Sakura286 <chenxuan@iscas.ac.cn>
Co-Developed-by: Paul Wise <pabs@debian.org>
Signed-off-by: Peter Colberg <peter@colberg.org>
---
 tests/t0109-gitconfig.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/t0109-gitconfig.sh b/tests/t0109-gitconfig.sh
index 189ef28..f67f553 100755
--- a/tests/t0109-gitconfig.sh
+++ b/tests/t0109-gitconfig.sh
@@ -24,7 +24,8 @@ test_no_home_access () {
 		-E HOME="$non_existent_path" \
 		-E CGIT_CONFIG="$PWD/cgitrc" \
 		-E QUERY_STRING="url=$1" \
-		-e access -f -o strace.out cgit &&
+		-e '?access,?faccessat,?faccessat2' \
+		-f -o strace.out cgit &&
 	! grep "$non_existent_path" strace.out
 }
 
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-18  0:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-18  0:40 [PATCH v1] tests: fix test_no_home_access on riscv64 Peter Colberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).