Skip to content

Commit 2c990d8

Browse files
committed
ci: force reinstall of kernel headers in asan
When using hosted runners in combination with cached docker images, there is the possibility that the host runner image is updated, rendering the linux-headers package (stored in the cached docker image) incompatible. Fix this by doing a re-install of the headers package in 03_test_script.sh. If the underlying runner kernel has not changed thie has no effect, but prevents the job from failing if it has.
1 parent 8842514 commit 2c990d8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ci/test/03_test_script.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ fi
2424
echo "Free disk space:"
2525
df -h
2626

27+
# We force an install of linux-headers again here via $PACKAGES to fix any
28+
# kernel mismatch between a cached docker image and the underlying host.
29+
# This can happen occasionally on hosted runners if the runner image is updated.
30+
if [[ "$CONTAINER_NAME" == "ci_native_asan" ]]; then
31+
$CI_RETRY_EXE apt-get update
32+
${CI_RETRY_EXE} bash -c "apt-get install --no-install-recommends --no-upgrade -y $PACKAGES"
33+
fi
34+
2735
# What host to compile for. See also ./depends/README.md
2836
# Tests that need cross-compilation export the appropriate HOST.
2937
# Tests that run natively guess the host

0 commit comments

Comments
 (0)