Interestingly, faccessat2() does correctly return ENOSYS when using a simple chroot instead of systemd-nspawn:
ubuntu@test-s390x:~/h$ sudo systemd-nspawn Spawning container h on /home/ubuntu/h. Press ^] three times within 1s to kill container. root@h:~# test -x /bin/bash || echo "fail" fail root@h:~# exit logout Container h exited successfully. ubuntu@test-s390x:~/h$ sudo chroot . root@test-s390x:/# test -x /bin/bash || echo "fail" root@test-s390x:/# and to verify, stracing bash: faccessat2(AT_FDCWD, "/bin/bash", X_OK, AT_EACCESS) = -1 ENOSYS (Function not implemented) faccessat(AT_FDCWD, "/bin/bash", X_OK) = 0 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1916485 Title: test -x fails inside shell scripts in containers To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-z-systems/+bug/1916485/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs