List for cgit developers and users
 help / color / mirror / Atom feed
From: Peter Colberg <peter@colberg.org>
To: cgit@lists.zx2c4.com
Cc: Peter Colberg <peter@colberg.org>,
	Sakura286 <chenxuan@iscas.ac.cn>, Paul Wise <pabs@debian.org>
Subject: [PATCH v1] tests: fix test_no_home_access on riscv64
Date: Sat, 17 Sep 2022 20:40:59 -0400	[thread overview]
Message-ID: <20220918004059.28596-1-peter@colberg.org> (raw)

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


                 reply	other threads:[~2022-09-18  0:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220918004059.28596-1-peter@colberg.org \
    --to=peter@colberg.org \
    --cc=cgit@lists.zx2c4.com \
    --cc=chenxuan@iscas.ac.cn \
    --cc=pabs@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).