File: tests-fix-test_no_home_access-on-riscv64.patch

package info (click to toggle)
cgit 1.2.3%2Bgit20250818.80.3346409%2Bgit2.51.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 58,624 kB
  • sloc: ansic: 313,383; sh: 260,576; perl: 25,871; tcl: 21,754; makefile: 4,192; python: 3,787; javascript: 810; csh: 45
file content (25 lines) | stat: -rw-r--r-- 1,008 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: tests: fix test_no_home_access on riscv64
 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.
Author: Sakura286 <chenxuan@iscas.ac.cn>
Author: Paul Wise <pabs@debian.org>
Author: Peter Colberg <peter@colberg.org>
Bug-Debian: https://bugs.debian.org/1019369
Last-Update: 2022-09-08
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- 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
 }