mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 09:58:09 +00:00
ci: run rootless tests in the main job
Signed-off-by: Andrei Vagin <avagin@google.com>
This commit is contained in:
parent
06516ca0ae
commit
60ca30145b
2
.github/workflows/compat-test.yml
vendored
2
.github/workflows/compat-test.yml
vendored
@ -4,7 +4,7 @@ on: [push, pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [GCC, CLANG]
|
target: [GCC, CLANG]
|
||||||
|
@ -21,7 +21,9 @@ RUN apk update && apk add \
|
|||||||
py3-pip \
|
py3-pip \
|
||||||
py3-protobuf \
|
py3-protobuf \
|
||||||
python3 \
|
python3 \
|
||||||
sudo
|
sudo \
|
||||||
|
libcap-utils \
|
||||||
|
util-linux
|
||||||
|
|
||||||
COPY . /criu
|
COPY . /criu
|
||||||
WORKDIR /criu
|
WORKDIR /criu
|
||||||
|
@ -217,6 +217,19 @@ if [ "${STREAM_TEST}" = "1" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Rootless tests
|
||||||
|
last_cap=$(cat /proc/sys/kernel/cap_last_cap)
|
||||||
|
# CAP_CHECKPOINT_RESTORE is 40.
|
||||||
|
if [ "$last_cap" -ge 40 ]; then
|
||||||
|
make -C test/zdtm/ cleanout
|
||||||
|
rm -rf test/dump
|
||||||
|
setcap cap_checkpoint_restore,cap_sys_ptrace+eip criu/criu
|
||||||
|
sudo --user=#65534 --group=#65534 unshare -Ucfpm --mount-proc -- bash -c "./test/zdtm.py run -t zdtm/static/maps00 -f h --rootless && true"
|
||||||
|
setcap -r criu/criu
|
||||||
|
fi
|
||||||
|
|
||||||
|
./criu/criu check || true
|
||||||
|
|
||||||
./test/zdtm.py run -a -p 2 --keep-going "${ZDTM_OPTS[@]}"
|
./test/zdtm.py run -a -p 2 --keep-going "${ZDTM_OPTS[@]}"
|
||||||
if criu/criu check --feature move_mount_set_group; then
|
if criu/criu check --feature move_mount_set_group; then
|
||||||
./test/zdtm.py run -a -p 2 --mntns-compat-mode --keep-going "${ZDTM_OPTS[@]}"
|
./test/zdtm.py run -a -p 2 --mntns-compat-mode --keep-going "${ZDTM_OPTS[@]}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user