lava: Use absolute directory for coredumps
authorKienan Stewart <kstewart@efficios.com>
Wed, 7 Jun 2023 13:00:37 +0000 (09:00 -0400)
committerKienan Stewart <kstewart@efficios.com>
Mon, 12 Jun 2023 18:10:23 +0000 (14:10 -0400)
If any of the scripts or tests modify the working directory in an
unexpected way, assuming that the coredump is relative to the working
directory will cause the jobs to fail.

Eg. https://lava-master-03.internal.efficios.com/scheduler/job/491

Change-Id: I0e6a71c1632109c5b62043dff20df587d81dd943

lava/benchmark/babeltrace/benchmark.yml
lava/system-tests/kernel-tests.yml
lava/system-tests/perf-tests.yml

index 3bd1c33e7c20f3e1bb1f772b5d474ffa5e52fec1..c007114fd4924c7505d16b89ee58829b33cc4e73 100644 (file)
@@ -22,8 +22,8 @@ run:
                 - apt install -y curl python3
                 - git clone https://github.com/lttng/lttng-ci ci
                 - export TMPDIR="/tmp"
-                - mkdir -p coredump
-                - echo "$(pwd)/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
+                - mkdir -p /tmp/coredump
+                - echo "/tmp/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
                 - ulimit -c unlimited
                 - mkdir /tmp/ram_disk
                 - mount -t tmpfs -o size=10024m new_ram_disk /tmp/ram_disk
index b1a551328cab72eab4cd4a26447b1fe13859a582..a5e8e8e17169ece2019ff227993c3f90b10f50c9 100644 (file)
@@ -10,8 +10,8 @@ run:
                 - apt install -y curl
                 - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci
                 - export TMPDIR="/tmp"
-                - mkdir -p coredump
-                - echo "$(pwd)/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
+                - mkdir -p /tmp/coredump
+                - echo "/tmp/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
                 - ulimit -c unlimited
                 - source /root/lttngvenv/activate
                 - pushd /root/lttngvenv/src/lttng-tools
@@ -19,5 +19,5 @@ run:
                 - 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
+                - tar czf coredump.tar.gz /tmp/coredump
                 - ./ci/lava/upload_artifact.sh coredump.tar.gz coredump.tar.gz "results/${JENKINS_BUILD_ID}/${TESTRUN_ID}-coredump.tar.gz"
index 0355d825f7e55c54d86cfeb2d9b16ef0ad187d15..6cd2e4ee45a7fb09e539eea860e48c301c816cb3 100644 (file)
@@ -10,8 +10,8 @@ run:
                 - apt install -y libpfm4-dev curl
                 - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci
                 - export TMPDIR="/tmp"
-                - mkdir -p coredump
-                - echo "$(pwd)/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
+                - mkdir -p /tmp/coredump
+                - echo "/tmp/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
                 - ulimit -c unlimited
                 - source /root/lttngvenv/activate
                 - pushd /root/lttngvenv/src/lttng-tools
@@ -20,5 +20,5 @@ run:
                 #Need to check if the file is present for branches where the testcase was not backported
                 - lava-test-case run-tests --shell "if [ -e perf_regression ]; then prove --nocolor --verbose --merge --exec '' - < perf_regression; else echo 'perf_regression not found'; fi"
                 - popd
-                - tar czf coredump.tar.gz coredump
+                - tar czf coredump.tar.gz /tmp/coredump
                 - ./ci/lava/upload_artifact.sh coredump.tar.gz coredump.tar.gz "results/${JENKINS_BUILD_ID}/${TESTRUN_ID}-coredump.tar.gz"
This page took 0.025086 seconds and 4 git commands to generate.