From a86a66fc2cbb77cdf0df69f3589c325018261d67 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Thu, 4 Nov 2021 09:10:38 +0000 Subject: [PATCH] ci: fix userfaultfd test failures Newer kernels (5.11) require echo 1 > /proc/sys/vm/unprivileged_userfaultfd Without the 'echo 1' the kernel prints a message like this: uffd: Set unprivileged_userfaultfd sysctl knob to 1 if kernel faults must be handled without obtaining CAP_SYS_PTRACE capability Signed-off-by: Adrian Reber --- scripts/ci/run-ci-tests.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/ci/run-ci-tests.sh b/scripts/ci/run-ci-tests.sh index 51aa7db9e..096f907fb 100755 --- a/scripts/ci/run-ci-tests.sh +++ b/scripts/ci/run-ci-tests.sh @@ -197,6 +197,12 @@ fi # shellcheck disable=SC2086 ./test/zdtm.py run -a -p 2 --keep-going $ZDTM_OPTS +# Newer kernels are blocking access to userfaultfd: +# uffd: Set unprivileged_userfaultfd sysctl knob to 1 if kernel faults must be handled without obtaining CAP_SYS_PTRACE capability +if [ -e /proc/sys/vm/unprivileged_userfaultfd ]; then + echo 1 > /proc/sys/vm/unprivileged_userfaultfd +fi + LAZY_EXCLUDE="-x maps04 -x cmdlinenv00 -x maps007" LAZY_TESTS='.*(maps0|uffd-events|lazy-thp|futex|fork).*'