[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cgit: FTBFS on riscv64: t0109-git-config test failed on riscv64



On Thu, 8 Sep 2022 07:41:38 +0800 Sakura286 wrote:

> 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.

It might be worth just passing both functions to -e, so that if other
new architectures also use faccessat or if existing architectures start
using faccessat then the tests will continue to work.

Reading the documentation, this should work, but please test it:

   strace -e access,faccessat

When creating riscv64 patches, please keep this general principle in
mind. Try to make the package more portable in general rather than just
making the specific change that is needed for RISC-V. Doing porting in
an arch-specific way usually means more work for other porters later,
while often it is possible to eliminate future work by redesigning
suboptimal portability efforts instead of just patching them.

You will thank yourself when you start working on riscv32/riscv128 ;)

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: