From 75fcec0ecbccea5b8258def25adb056e4d02c0c1 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Sun, 17 Nov 2019 16:05:47 +0200 Subject: [PATCH] travis: exclude uns tests for lazy-pages on newer kernels Kernels 5.4 and higher will restrict availability of UFFD_EVENT_FORK only for users with SYS_CAP_PTRACE. This prevents running --lazy-pages tests with 'uns' flavor. Disable 'uns' for lazy pages testing in travis for newer kernels. Signed-off-by: Mike Rapoport --- scripts/travis/travis-tests | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/travis/travis-tests b/scripts/travis/travis-tests index a87ddbaf4..4cb842c97 100755 --- a/scripts/travis/travis-tests +++ b/scripts/travis/travis-tests @@ -145,8 +145,15 @@ else fi LAZY_EXCLUDE="$LAZY_EXCLUDE -x maps04" +# Starting with 5.4 kernel requires SYS_CAP_PTRACE to use uffd events; as such +# we cannot run lazy-pages tests in uns +LAZY_FLAVORS="" +if [ $KERN_MAJ -ge "5" ] && [ $KERN_MIN -ge "4" ]; then + LAZY_FLAVORS = "-f h,ns" +fi + LAZY_TESTS=.*\(maps0\|uffd-events\|lazy-thp\|futex\|fork\).* -LAZY_OPTS="-p 2 -T $LAZY_TESTS $LAZY_EXCLUDE $ZDTM_OPTS" +LAZY_OPTS="-p 2 -T $LAZY_TESTS $LAZY_EXCLUDE $LAZY_FLAVORS $ZDTM_OPTS" ./test/zdtm.py run $LAZY_OPTS --lazy-pages ./test/zdtm.py run $LAZY_OPTS --remote-lazy-pages