![](https://seccdn.libravatar.org/avatar/5b748275c3dbb1ceee18ed554486547d.jpg?s=120&d=mm&r=g)
On Thursday 2021-09-02 11:27, Martin Wilck wrote:
On Thu, 2021-09-02 at 11:15 +0200, Frans de Boer wrote:
If I do the following: if test -r <some file>; then echo ok; fi Then the reply is 'ok' under normal x86_64 TW. [...]It is blocking me from compiling programs under aarch64 because the configure script is using these tests. If I change the ´-r´ flag within configure into a ´-s´, everything does work well.
Well, test -s and test -r are very different things.
Not only that. test and test are different! I had a debugging session on IRC not too long ago involving configure and test inside a docker namespace, with a surprising result: [root@46d397eef00e /]# cat /etc/redhat-release Fedora release 34 (Thirty Four) [root@46d397eef00e /]# /bin/test -x / ; echo $? 0 [root@46d397eef00e /]# test -x / ; echo $? 1 Tracing revealed that one is using faccessat(2), the other is using access(2), which pointed to syscall filtering being the culprit. Even though qemu does not filter, it may need to emulate/passthru, and that slope is sooo slippery.