diff --git a/.gitignore b/.gitignore index 5dea7cf..f6a3a77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/criu-3.15.tar.bz2 -/criu-3.15.tar.bz2 +/*.tar.gz diff --git a/criu.spec b/criu.spec index 9ded31a..d9ba847 100644 --- a/criu.spec +++ b/criu.spec @@ -7,7 +7,7 @@ Name: criu Version: 3.15 -Release: 2%{?dist} +Release: 3%{?dist} Provides: crtools = %{version}-%{release} Obsoletes: crtools <= 1.0-2 Summary: Tool for Checkpoint/Restore in User-space @@ -115,6 +115,10 @@ rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name} %doc %{_mandir}/man1/crit.1* %changelog +* Mon Mar 07 2022 Andrew Hughes - 3.15-3 +- Build in RHEL 8.7 so we can obtain crui-devel for jigawatts +- Resolves: rhbz#1971718 + * Mon Aug 02 2021 Jindrich Novy - 3.15-2 - add gating tests - Related: #1971718 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/tests/run-podman-checkpoint-restore.sh b/tests/run-podman-checkpoint-restore.sh new file mode 100755 index 0000000..0fbcd2b --- /dev/null +++ b/tests/run-podman-checkpoint-restore.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# crun is not built with checkpoint/restore support +exit 0 + +set -eux + +ls -la + +echo "Start container" +podman --log-level debug run -d quay.io/adrianreber/counter + +echo "See which containers are running" +podman ps + +echo "Connect to the container" +curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8088 + +echo "Checkpoint container" +podman --log-level debug container checkpoint -l + +podman ps -a +echo "Restore container" +podman --log-level debug container restore -l + +podman ps -a +echo "Check if we can connect to the restored container" +curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8088 + +ls -la diff --git a/tests/run-zdtm.sh b/tests/run-zdtm.sh new file mode 100755 index 0000000..350f0a9 --- /dev/null +++ b/tests/run-zdtm.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +set -x + +uname -a + +# These zdtm tests are skipped because they fail only in CI system +EXCLUDES=" \ + -x zdtm/static/socket-tcp-reseted \ + -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/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/cgroup02 " + +run_test() { + ./zdtm.py run --criu-bin /usr/sbin/criu ${EXCLUDES} \ + -a --ignore-taint --keep-going + + RESULT=$? +} + + +RESULT=42 + +python -V + +# this socket brakes CRIU's test cases +rm -f /var/lib/sss/pipes/nss + +# Move away the nft binary to avoid confusions with CRIU. +# This is already fixed upstream. + +[ -e /usr/sbin/nft ] && mv /usr/sbin/nft /usr/sbin/nft.away + +cd source + +echo "Build CRIU" +make + +cd test + +echo "Run the actual CRIU test suite" +run_test + +if [ "$RESULT" -ne "0" ]; then + # Run tests a second time to make sure it is a real failure + echo "Something failed. Run the actual CRIU test suite a second time" + run_test + if [ "$RESULT" -ne "0" ]; then + echo "Still a test suite error. Something seems to be actually broken" + exit $RESULT + fi +fi + +exit 0 diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..ff1c692 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,35 @@ +--- +- hosts: localhost + roles: + - role: standard-test-source + tags: + - classic + - role: standard-test-basic + tags: + - classic + required_packages: + - podman + - curl + - jq + - checkpolicy + - policycoreutils + - make + - gcc + - python3 + - libnet-devel + - protobuf-devel + - protobuf-c-devel + - python3-devel + - libnl3-devel + - libcap-devel + - libaio-devel + - python3-pyyaml + - python3-protobuf + - python-unversioned-command + tests: + - zdtm: + dir: . + run: ./run-zdtm.sh + - podman: + dir: . + run: ./run-podman-checkpoint-restore.sh