From b99f07a04324a28348cd02694f585b947154dec7 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Sat, 4 May 2019 16:46:04 +0200 Subject: [PATCH] Also run CRIU's zdtm test suite in tests.yml Signed-off-by: Adrian Reber --- criu.spec | 4 +-- tests/run-zdtm.sh | 64 +++++++++++++++++++++++++++++++++++++++++++++++ tests/tests.yml | 3 +++ 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100755 tests/run-zdtm.sh diff --git a/criu.spec b/criu.spec index 264ae90..66572bb 100644 --- a/criu.spec +++ b/criu.spec @@ -12,7 +12,7 @@ Name: criu Version: 3.12 -Release: 6%{?dist} +Release: 7%{?dist} Provides: crtools = %{version}-%{release} Obsoletes: crtools <= 1.0-2 Summary: Tool for Checkpoint/Restore in User-space @@ -175,7 +175,7 @@ rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name} %changelog -* Sat May 04 2019 Adrian Reber - 3.12-6 +* Sat May 04 2019 Adrian Reber - 3.12-7 - Patch for socket labelling has changed upstream * Mon Apr 29 2019 Adrian Reber - 3.12-4 diff --git a/tests/run-zdtm.sh b/tests/run-zdtm.sh new file mode 100755 index 0000000..b6d874f --- /dev/null +++ b/tests/run-zdtm.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +set -x + +uname -a + +# Two IPv6 related tests are failing in CI, not sure why. +echo "Network setup" +cat /etc/hosts +ip a +ping localhost -c 3 -4 +ping localhost -c 3 -6 +ping localhost -c 3 + +# 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/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 + +echo "Create python link to python3 for zdtm" +ln -s /usr/bin/python3 /usr/bin/python + +# this socket brakes CRIU's test cases +rm -f /var/lib/sss/pipes/nss + +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 index f7ae5d4..588ad73 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -29,3 +29,6 @@ - podman: dir: . run: ./run-podman-checkpoint-restore.sh + - zdtm: + dir: . + run: ./run-zdtm.sh