mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
7324496f1a
Some test directories are created using mktemp -d, and so they have permissions set to 0700 and are thus inaccessible to a user inside userns. This was workarounded for $ROOT in userns.bats before. Now, when we have updated Cirrus CI config to use Fedora 35 (rather than 34), userns tests fail: > runc run failed: unable to start container process: error during > container init: error preparing rootfs: mount > /tmp/bats-run-4pCERd/runc.f66gCC/bundle/rootfs:/tmp/bats-run-4pCERd/runc.f66gCC/bundle/rootfs, > flags: 0x5000: permission denied Fedora 34 image used kernel v5.11, while Fedora 35 has v5.15. Apparently, the newer kernel also checks that the parent directories are accessible by the user before doing mount. Move the old workaround from userns.bats to helpers.bats, drop the r bit (not needed), and add $BATS_RUN_TMPDIR (also created by mktemp -d) to fix userns.bats test failures under Fedora 35. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>