Skip to content

Commit e74ff0f

Browse files
authored
Merge pull request #4252 from kolyshkin/test-actuated-cr
ci/actuated: re-enable CRIU tests
2 parents 52bd9fd + baba55e commit e74ff0f

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,18 @@ jobs:
123123
sudo apt -y install libseccomp-dev sshfs uidmap
124124
125125
- name: install CRIU
126-
# TODO: enable CRIU for actuated: https://github.com/opencontainers/runc/pull/4142#issuecomment-1945408382
127-
if: ${{ matrix.os != 'actuated-arm64-6cpu-8gb' && matrix.criu == '' }}
126+
if: ${{ matrix.criu == '' }}
128127
env:
129128
PREFIX: https://download.opensuse.org/repositories/devel:/tools:/criu/xUbuntu
130129
run: |
131-
# criu repo
132-
REPO=${PREFIX}_$(echo ${{ matrix.os }} | sed 's/.*-//')
130+
REPO=${PREFIX}_$(. /etc/os-release && echo $VERSION_ID)
133131
curl -fSsLl $REPO/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_tools_criu.gpg > /dev/null
134132
echo "deb $REPO/ /" | sudo tee /etc/apt/sources.list.d/criu.list
135133
sudo apt update
136134
sudo apt -y install criu
137135
138136
- name: install CRIU (criu ${{ matrix.criu }})
139-
if: ${{ matrix.os != 'actuated-arm64-6cpu-8gb' && matrix.criu != '' }}
137+
if: ${{ matrix.criu != '' }}
140138
run: |
141139
sudo apt -qy install \
142140
libcap-dev libnet1-dev libnl-3-dev \

tests/integration/checkpoint.bats

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ function simple_cr() {
173173
}
174174

175175
@test "checkpoint --pre-dump and restore" {
176+
# Requires kernel dirty memory tracking (missing on ARM, see
177+
# https://github.com/checkpoint-restore/criu/issues/1729).
178+
requires criu_feature_mem_dirty_track
179+
176180
setup_pipes
177181
runc_run_with_pipes test_busybox
178182

@@ -202,10 +206,8 @@ function simple_cr() {
202206
}
203207

204208
@test "checkpoint --lazy-pages and restore" {
205-
# check if lazy-pages is supported
206-
if ! criu check --feature uffd-noncoop; then
207-
skip "this criu does not support lazy migration"
208-
fi
209+
# Requires lazy-pages support.
210+
requires criu_feature_uffd-noncoop
209211

210212
setup_pipes
211213
runc_run_with_pipes test_busybox
@@ -274,11 +276,8 @@ function simple_cr() {
274276
}
275277

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

283282
# create a temporary name for the test network namespace
284283
tmp=$(mktemp)

tests/integration/helpers.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,12 @@ function requires() {
407407
skip_me=1
408408
fi
409409
;;
410+
criu_feature_*)
411+
var=${var#criu_feature_}
412+
if ! criu check --feature "$var"; then
413+
skip "requires CRIU feature ${var}"
414+
fi
415+
;;
410416
root)
411417
if [ $EUID -ne 0 ]; then
412418
skip_me=1

0 commit comments

Comments
 (0)