Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/actuated: re-enable CRIU tests #4252

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,18 @@ jobs:
sudo apt -y install libseccomp-dev sshfs uidmap

- name: install CRIU
# TODO: enable CRIU for actuated: https://github.com/opencontainers/runc/pull/4142#issuecomment-1945408382
if: ${{ matrix.os != 'actuated-arm64-6cpu-8gb' && matrix.criu == '' }}
if: ${{ matrix.criu == '' }}
env:
PREFIX: https://download.opensuse.org/repositories/devel:/tools:/criu/xUbuntu
run: |
# criu repo
REPO=${PREFIX}_$(echo ${{ matrix.os }} | sed 's/.*-//')
REPO=${PREFIX}_$(. /etc/os-release && echo $VERSION_ID)
curl -fSsLl $REPO/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_tools_criu.gpg > /dev/null
echo "deb $REPO/ /" | sudo tee /etc/apt/sources.list.d/criu.list
sudo apt update
sudo apt -y install criu

- name: install CRIU (criu ${{ matrix.criu }})
if: ${{ matrix.os != 'actuated-arm64-6cpu-8gb' && matrix.criu != '' }}
if: ${{ matrix.criu != '' }}
run: |
sudo apt -qy install \
libcap-dev libnet1-dev libnl-3-dev \
Expand Down
17 changes: 8 additions & 9 deletions tests/integration/checkpoint.bats
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ function simple_cr() {
}

@test "checkpoint --pre-dump and restore" {
# Requires kernel dirty memory tracking (missing on ARM, see
# https://github.com/checkpoint-restore/criu/issues/1729).
requires criu_feature_mem_dirty_track

setup_pipes
runc_run_with_pipes test_busybox

Expand Down Expand Up @@ -202,10 +206,8 @@ function simple_cr() {
}

@test "checkpoint --lazy-pages and restore" {
# check if lazy-pages is supported
if ! criu check --feature uffd-noncoop; then
skip "this criu does not support lazy migration"
fi
# Requires lazy-pages support.
requires criu_feature_uffd-noncoop

setup_pipes
runc_run_with_pipes test_busybox
Expand Down Expand Up @@ -274,11 +276,8 @@ function simple_cr() {
}

@test "checkpoint and restore in external network namespace" {
# check if external_net_ns is supported; only with criu 3.10++
if ! criu check --feature external_net_ns; then
# this criu does not support external_net_ns; skip the test
skip "this criu does not support external network namespaces"
fi
# Requires external network namespaces (criu >= 3.10).
requires criu_feature_external_net_ns

# create a temporary name for the test network namespace
tmp=$(mktemp)
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,12 @@ function requires() {
skip_me=1
fi
;;
criu_feature_*)
var=${var#criu_feature_}
if ! criu check --feature "$var"; then
skip "requires CRIU feature ${var}"
fi
;;
root)
if [ $EUID -ne 0 ]; then
skip_me=1
Expand Down
Loading