diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans.fmf b/plans.fmf new file mode 100644 index 0000000..946731e --- /dev/null +++ b/plans.fmf @@ -0,0 +1,21 @@ +summary: Run all tests +discover: + how: fmf +prepare: + - name: Install the main package + how: install + package: + - criu +execute: + how: tmt + +/zdtm: + # Use the srpm sources + discover+: + dist-git-source: true + dist-git-merge: true + test: /tests/zdtm + +/podman: + discover+: + test: /tests/podman diff --git a/tests/tests.yml b/tests/main.fmf similarity index 52% rename from tests/tests.yml rename to tests/main.fmf index c1e90f7..8889ee6 100644 --- a/tests/tests.yml +++ b/tests/main.fmf @@ -1,21 +1,17 @@ ---- -- hosts: localhost - roles: - - role: standard-test-source - tags: - - classic - - role: standard-test-basic - tags: - - classic - required_packages: - - podman - - curl - - jq +/zdtm: + summary: Test zdtm + test: ./run-zdtm.sh + duration: 30m + check: + - how: avc + result: info + require: - checkpolicy - policycoreutils - make - gcc - python3 + - coreutils - libnet-devel - protobuf-devel - protobuf-c-devel @@ -27,10 +23,13 @@ - nftables-devel - python3-pyyaml - python3-protobuf - tests: - - zdtm: - dir: . - run: ./run-zdtm.sh - - podman: - dir: . - run: ./run-podman-checkpoint-restore.sh + - python-unversioned-command + - crit + - python3-criu +/podman: + summary: Test podman + test: ./run-podman-checkpoint-restore.sh + require: + - podman + - curl + - jq diff --git a/tests/run-podman-checkpoint-restore.sh b/tests/run-podman-checkpoint-restore.sh index 845d0b4..6ed7ad6 100755 --- a/tests/run-podman-checkpoint-restore.sh +++ b/tests/run-podman-checkpoint-restore.sh @@ -3,6 +3,9 @@ set -eux ls -la +uname -a +rpm -qi criu || true +criu --version echo "Start container" podman --log-level debug run -d quay.io/adrianreber/counter diff --git a/tests/run-zdtm.sh b/tests/run-zdtm.sh index c720595..30f58be 100755 --- a/tests/run-zdtm.sh +++ b/tests/run-zdtm.sh @@ -3,24 +3,43 @@ set -x uname -a +rpm -qi criu || true +criu --version -# These zdtm tests are skipped because most of them rely -# on the iptables binary. +# These zdtm tests are skipped because they fail only in CI system EXCLUDES=" \ - -x zdtm/static/net_lock_socket_iptables \ - -x zdtm/static/net_lock_socket_iptables6 \ - -x zdtm/static/netns-nf \ - -x zdtm/static/netns_lock_iptables \ - -x zdtm/static/socket-tcp-closed-last-ack \ - -x zdtm/static/socket-tcp-nfconntrack \ -x zdtm/static/socket-tcp-reseted \ - -x zdtm/static/socket-tcp-syn-sent \ + -x zdtm/static/socket-tcp-closed \ + -x zdtm/static/socket-tcp-closed-last-ack \ + -x zdtm/static/socket-tcp6-closed \ + -x zdtm/static/socket-tcp4v6-closed \ + -x zdtm/static/maps01 \ + -x zdtm/static/maps04 \ + -x zdtm/static/del_standalone_un \ + -x zdtm/static/del_standalone_un_seqpacket \ + -x zdtm/static/deleted_unix_sock \ + -x zdtm/static/fifo_upon_unix_socket00 \ + -x zdtm/static/sk-unix-dgram-ghost \ + -x zdtm/static/sk-unix01 \ + -x zdtm/static/sk-unix01-seqpacket \ + -x zdtm/static/socket-tcpbuf \ + -x zdtm/static/socket-tcpbuf6 \ + -x zdtm/static/sockets00 \ + -x zdtm/static/sockets00-seqpacket \ + -x zdtm/static/sockets03 \ + -x zdtm/static/sockets03-seqpacket \ + -x zdtm/static/cgroup04 \ + -x zdtm/static/cgroup_ifpriomap \ + -x zdtm/static/netns_sub \ + -x zdtm/static/netns_sub_veth \ + -x zdtm/static/file_locks01 \ -x zdtm/static/mntns_link_remap \ -x zdtm/static/unlink_fstat03 \ - -x zdtm/static/unlink_regular00 " + -x zdtm/static/unlink_regular00 \ + -x zdtm/static/cgroup02 " run_test() { - ./zdtm.py run --criu-bin /usr/sbin/criu ${EXCLUDES} \ + python3 ./zdtm.py run --criu-bin /usr/sbin/criu ${EXCLUDES} \ -a --ignore-taint --keep-going RESULT=$? @@ -32,13 +51,10 @@ RESULT=42 # this socket breaks CRIU's test cases rm -f /var/lib/sss/pipes/nss -cd source +cd ../criu-$(crit --version) echo "Build CRIU" -make - -which criu -rpm -qf `which criu` +make -j"$(nproc)" cd test