Skip to content

Commit 9465627

Browse files
committed
ci: run tests on a nftables only system
Signed-off-by: Adrian Reber <areber@redhat.com>
1 parent 08b4743 commit 9465627

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Nftables bases testing
2+
3+
on: [push, pull_request]
4+
5+
# Cancel any preceding run on the pull request.
6+
concurrency:
7+
group: nftables-test-${{ github.event.pull_request.number || github.ref }}
8+
cancel-in-progress: ${{ github.ref != 'refs/heads/criu-dev' }}
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Remove iptables
16+
run: sudo apt remove -y iptables
17+
- name: Install libnftables-dev
18+
run: sudo scripts/ci/apt-install libnftables-dev
19+
- name: Build with nftables network locking backend
20+
run: sudo make -C scripts/ci local COMPILE_FLAGS="NETWORK_LOCK_DEFAULT=NETWORK_LOCK_NFTABLES"

scripts/ci/run-ci-tests.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,14 @@ if [ "${CD_TO_TOP}" = "1" ]; then
121121
fi
122122

123123
export GCOV CC
124+
if [ -z "$COMPILE_FLAGS" ]; then
125+
LOCAL_COMPILE_FLAGS=("V=1")
126+
else
127+
IFS=" " read -r -a LOCAL_COMPILE_FLAGS <<< "$COMPILE_FLAGS"
128+
LOCAL_COMPILE_FLAGS=("V=1" "${LOCAL_COMPILE_FLAGS[@]}")
129+
fi
124130
$CC --version
125-
time make CC="$CC" -j4 V=1
131+
time make CC="$CC" -j4 "${LOCAL_COMPILE_FLAGS[@]}"
126132

127133
./criu/criu -v4 cpuinfo dump || :
128134
./criu/criu -v4 cpuinfo check || :
@@ -150,6 +156,7 @@ ulimit -c unlimited
150156
cgid=$$
151157
cleanup_cgroup() {
152158
./test/zdtm_umount_cgroups $cgid
159+
dmesg
153160
}
154161
trap cleanup_cgroup EXIT
155162
./test/zdtm_mount_cgroups $cgid
@@ -205,6 +212,16 @@ chmod 0777 test/
205212
chmod 0777 test/zdtm/static
206213
chmod 0777 test/zdtm/transition
207214

215+
ls -la / || true
216+
ls -la /home || true
217+
ls -la /home/runner || true
218+
ls -la /home/runner/work || true
219+
ls -la /home/runner/work/criu || true
220+
ls -la /home/runner/work/criu/criu || true
221+
ls -la /home/runner/work/criu/criu/test || true
222+
ls -la /home/runner/work/criu/criu/test/zdtm || true
223+
ls -la /home/runner/work/criu/criu/test/zdtm/static || true
224+
208225
# We run streaming tests separately to improve test completion times,
209226
# hence the exit 0.
210227
if [ "${STREAM_TEST}" = "1" ]; then

0 commit comments

Comments
 (0)