Skip to content

Commit

Permalink
Merge pull request #3261 from kolyshkin/test-f35
Browse files Browse the repository at this point in the history
ci/cirrus: use Fedora 35
  • Loading branch information
Mrunal Patel authored Nov 4, 2021
2 parents a7ccc02 + 4b25a4e commit 931eb94
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ task:
HOME: /root
# yamllint disable rule:key-duplicates
matrix:
DISTRO: fedora34
DISTRO: fedora

name: vagrant DISTRO:$DISTRO

Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile.fedora34 → Vagrantfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Vagrant.configure("2") do |config|
# Fedora box is used for testing cgroup v2 support
config.vm.box = "fedora/34-cloud-base"
config.vm.box = "fedora/35-cloud-base"
config.vm.provider :virtualbox do |v|
v.memory = 2048
v.cpus = 2
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/cgroups.bats
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ function setup() {
if [ "$(id -u)" = "0" ]; then
check_cgroup_value "cgroup.controllers" "$(cat /sys/fs/cgroup/machine.slice/cgroup.controllers)"
else
# Filter out hugetlb as systemd is unable to delegate it.
check_cgroup_value "cgroup.controllers" "$(sed 's/ hugetlb//' </sys/fs/cgroup/user.slice/user-"$(id -u)".slice/cgroup.controllers)"
# Filter out hugetlb and misc as systemd is unable to delegate them.
check_cgroup_value "cgroup.controllers" "$(sed -e 's/ hugetlb//' -e 's/ misc//' </sys/fs/cgroup/user.slice/user-"$(id -u)".slice/cgroup.controllers)"
fi
else
check_cgroup_value "cgroup.controllers" "$(cat /sys/fs/cgroup/cgroup.controllers)"
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,12 @@ function setup_bundle() {
ROOT=$(mktemp -d "$BATS_RUN_TMPDIR/runc.XXXXXX")
mkdir -p "$ROOT/state" "$ROOT/bundle/rootfs"

# Directories created by mktemp -d have 0700 permission bits. Tests
# running inside userns (see userns.bats) need to access the directory
# as a different user to mount the rootfs. Since kernel v5.12, parent
# directories are also checked. Give a+x for these tests to work.
chmod a+x "$ROOT" "$BATS_RUN_TMPDIR"

setup_recvtty
cd "$ROOT/bundle" || return

Expand Down
4 changes: 0 additions & 4 deletions tests/integration/userns.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ function setup() {
mkdir -p rootfs/{proc,sys,tmp}
mkdir -p rootfs/tmp/mount-{1,2}

# We need to give permissions for others so the uid inside the userns
# can mount the rootfs on itself. Otherwise the rootfs mount will fail.
chmod 755 "$ROOT"

if [ "$ROOTLESS" -eq 0 ]; then
update_config ' .linux.namespaces += [{"type": "user"}]
| .linux.uidMappings += [{"hostID": 100000, "containerID": 0, "size": 65534}]
Expand Down

0 comments on commit 931eb94

Please sign in to comment.