Files
runc/tests
Kir Kolyshkin 7324496f1a tests/int: fix userns for Fedora 35
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>
2021-11-03 19:07:37 -07:00
..
2021-03-23 11:22:09 +00:00
2021-07-23 09:23:23 +02:00