diff options
author | Eric Anholt <eric@anholt.net> | 2020-07-22 13:59:49 -0700 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-07-30 11:41:57 +0000 |
commit | cb82274538bbfc80c385c9fe13a22d576c79d5de (patch) | |
tree | f1d8f47d4ef3976a8d59ad612a5f47035da58890 /.gitlab-ci | |
parent | 3120b4dcd301b3eb6c9d119b41417f91dc5d0b1d (diff) |
ci/bare-metal: Capture the first devcoredump a job produces.
Connor recently ran into an issue where the chezas were hanging where his
GPUs weren't, and was blocked on getting some feedback on what was
happening. A devcoredump will help non-cheza-having devs debug (or
hopefully with other intermittent fails).
Closes: #3187
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6036>
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x | .gitlab-ci/bare-metal/capture-devcoredump.sh | 14 | ||||
-rwxr-xr-x | .gitlab-ci/bare-metal/init.sh | 4 | ||||
-rw-r--r-- | .gitlab-ci/bare-metal/rootfs-setup.sh | 2 |
3 files changed, 20 insertions, 0 deletions
diff --git a/.gitlab-ci/bare-metal/capture-devcoredump.sh b/.gitlab-ci/bare-metal/capture-devcoredump.sh new file mode 100755 index 00000000000..095bad875a4 --- /dev/null +++ b/.gitlab-ci/bare-metal/capture-devcoredump.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +while true; do + devcds=`find /sys/devices/virtual/devcoredump/ -name data` + for i in $devcds; do + echo "Found a devcoredump at $i." + if cp $i /results/first.devcore; then + echo 1 > $i + echo "Saved to the job artifacts at /first.devcore" + exit 0 + fi + done + sleep 10 +done diff --git a/.gitlab-ci/bare-metal/init.sh b/.gitlab-ci/bare-metal/init.sh index 797f0d73e72..2e67b1c64da 100755 --- a/.gitlab-ci/bare-metal/init.sh +++ b/.gitlab-ci/bare-metal/init.sh @@ -19,6 +19,10 @@ echo "nameserver 8.8.8.8" > /etc/resolv.conf # Overwrite traces.yml file with the baremetal version cp /install/traces-baremetal.yml /install/traces.yml +# Start a little daemon to capture the first devcoredump we encounter. (They +# expire after 5 minutes, so we poll for them). +./capture-devcoredump.sh & + if sh $BARE_METAL_TEST_SCRIPT; then OK=1 else diff --git a/.gitlab-ci/bare-metal/rootfs-setup.sh b/.gitlab-ci/bare-metal/rootfs-setup.sh index 27735e2d32c..c5106c06472 100644 --- a/.gitlab-ci/bare-metal/rootfs-setup.sh +++ b/.gitlab-ci/bare-metal/rootfs-setup.sh @@ -7,6 +7,8 @@ mkdir -p $rootfs_dst/results # Set up the init script that brings up the system. cp $BM/init.sh $rootfs_dst/init +cp $BM/capture-devcoredump.sh $rootfs_dst/ + set +x # Pass through relevant env vars from the gitlab job to the baremetal init script touch $rootfs_dst/set-job-env-vars.sh |