lava: Remove redundant destructive tests
authorKienan Stewart <kstewart@efficios.com>
Mon, 5 Jun 2023 19:01:34 +0000 (15:01 -0400)
committerKienan Stewart <kstewart@efficios.com>
Mon, 5 Jun 2023 19:54:53 +0000 (15:54 -0400)
The majority of destructive tests are already being run in make check
via run-test-suites.sh. The only case not covered by that script was
the tests in 'root_destructive_tests' in the stable-2.12 and
stable-2.13 branches.

By adding support for that in run-tests-suites.sh, the
destructive-tests.yml can be completely removed from LAVA.

Change-Id: Ied4aceafb222cfe54c20ebff83608f702c1221e6

lava/system-tests/destructive-tests.yml [deleted file]
lava/system-tests/kernel-tests.yml
scripts/system-tests/run-test-suites.sh
scripts/system-tests/template_lava_job.jinja2

diff --git a/lava/system-tests/destructive-tests.yml b/lava/system-tests/destructive-tests.yml
deleted file mode 100644 (file)
index b1b4f27..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-metadata:
-        format: Lava-Test Test Definition 1.0
-        name: lttng-destructive-tests
-        description: "Run root destructive test suite"
-params:
-  JENKINS_BUILD_ID: "invalid_jenkins_build_id"
-  LTTNG_VERSION_STRING: "invalid_version_string"
-run:
-        steps:
-                - apt install -y curl
-                - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci
-                - export TMPDIR="/tmp"
-                - systemctl stop systemd-timesyncd.service
-                - mkdir -p coredump
-                - echo "$(pwd)/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
-                - ulimit -c unlimited
-                - source /root/lttngvenv/activate
-                - pushd /root/lttngvenv/src/lttng-tools
-                - lava-test-case build-test-suite --shell "make"
-                - export LTTNG_ENABLE_DESTRUCTIVE_TESTS="will-break-my-system"
-                - cd tests
-                #Need to check if the file is present for branches where the testcase was not backported
-                - lava-test-case run-tests --shell "if [ -e root_destructive_tests ]; then prove --nocolor --verbose --merge --exec '' - < root_destructive_tests; else echo 'root_destructive_tests not found'; fi"
-                - popd
-                - systemctl start systemd-timesyncd.service
-                - tar czf coredump.tar.gz coredump
-                - ./ci/lava/upload_artifact.sh coredump.tar.gz "results/${JENKINS_BUILD_ID}/coredump.tar.gz"
index f51c969a34fd73f3f5726e77214a85f184bfa5bc..b1a551328cab72eab4cd4a26447b1fe13859a582 100644 (file)
@@ -16,6 +16,8 @@ run:
                 - source /root/lttngvenv/activate
                 - pushd /root/lttngvenv/src/lttng-tools
                 - lava-test-case build-test-suite --shell "make"
+                - systemctl stop systemd-timesyncd.service
                 - lava-test-case run-tests --shell "$(dirs -l +1)/ci/scripts/system-tests/run-test-suites.sh ${LTTNG_VERSION_STRING}"
+                - systemctl start systemd-timesyncd.service
                 - tar czf coredump.tar.gz coredump
                 - ./ci/lava/upload_artifact.sh coredump.tar.gz coredump.tar.gz "results/${JENKINS_BUILD_ID}/${TESTRUN_ID}-coredump.tar.gz"
index fc2f8df4f01279a50a081a8db5b175eebcb5e7d4..21782f1b179f5d5fc6d457cc905e0e5512027403 100755 (executable)
@@ -76,12 +76,19 @@ export LTTNG_ENABLE_DESTRUCTIVE_TESTS="will-break-my-system"
 make --keep-going check || failed_tests=1
 
 if [ -f "./tests/root_regression" ]; then
-       cd "./tests" || exit 1
-       prove --nocolor --verbose --merge --exec '' - < root_regression || failed_tests=1
-       cd ..
+    cd "./tests" || exit 1
+    prove --nocolor --verbose --merge --exec '' - < root_regression || failed_tests=1
+    cd ..
 fi
 
-exit $failed_tests
-
-
+# This script doesn't exist in master anymore, but compatibility with old branches
+# should be retained until lttng-tools 2.13 is no longer supported
+if [ -f "./tests/root_destructive_tests" ]; then
+    cd "./tests" || exit 1
+    prove --nocolor --verbose --merge --exec '' - < root_destructive_tests || failed_tests=2
+    cd ..
+else
+    echo 'root_destructive_tests not found'
+fi
 
+exit $failed_tests
index 5aaece84c9fc07eae4617f2e2cee6029a4504170..ed60cf1fbe5ad68e9a3581e98ef13feb2ffb4cb4 100644 (file)
@@ -118,14 +118,4 @@ actions:
                 JENKINS_BUILD_ID: {{ jenkins_build_id }}
                 CI_REPO: {{ ci_repo }}
                 CI_BRANCH: {{ ci_branch }}
-            - repository: {{ ci_repo }}
-              from: git
-              branch: {{ ci_branch }}
-              path: lava/system-tests/destructive-tests.yml
-              name: destructive-tests
-              params:
-                LTTNG_VERSION_STRING: {{ lttng_version_string }}
-                JENKINS_BUILD_ID: {{ jenkins_build_id }}
-                CI_REPO: {{ ci_repo }}
-                CI_BRANCH: {{ ci_branch }}
           {% endif %}
This page took 0.056053 seconds and 4 git commands to generate.