Source: cgit
Version: 1.2.3+git2.25.1-1
Severity: normal
Tags: ftbfs, patch
User: debian-ri...@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-ri...@lists.debian.org
Dear Maintainer,
cgit failed on riscv64 due to t0109-git-config test [1].
On riscv64, "strace -e access cgit-1.2.3+git2.25.1/cgit" returned
"strace: invalid system call 'access'". And when "strace cgit" on
riscv64, "faccessat(AT_FDCWD,xx,yy)" rather than "access(xx,yy)" is called.
According to the manual of "access"[2], if passed AT_FDCWD, "faccessat"
behaves same as "access" [2]. So I add "-e faccessat" for riscv64. I
have tested the patch on amd64 and riscv64.
The patch is attached below.
Regards,
Sakura286.
[1]
https://buildd.debian.org/status/fetch.php?pkg=cgit&arch=riscv64&ver=1.2.3%2Bgit2.25.1-1&stamp=1660429218
[2] https://man7.org/linux/man-pages/man2/faccessat.2.html
--- a/tests/t0109-gitconfig.sh
+++ b/tests/t0109-gitconfig.sh
@@ -15,6 +15,17 @@
exit
}
+# When 'strace cgit' on riscv64, 'faccessat(AT_FDCWD,xx,yy)' rather than
+# 'access(xx,yy)' is called. If passed AT_FDCWD, 'faccessat' behaves
+# samely as 'access'.
+
+if [ $(uname -m) != 'riscv64' ]
+then
+ syscall_access='access'
+else
+ syscall_access='faccessat'
+fi
+
test_no_home_access () {
non_existent_path="/path/to/some/place/that/does/not/possibly/exist"
while test -d "$non_existent_path"; do
@@ -24,7 +35,7 @@
-E HOME="$non_existent_path" \
-E CGIT_CONFIG="$PWD/cgitrc" \
-E QUERY_STRING="url=$1" \
- -e access -f -o strace.out cgit &&
+ -e $syscall_access -f -o strace.out cgit &&
test_must_fail grep "$non_existent_path" strace.out
}