From d7d09eb02328ca5998b7887880b66c78edd65dff Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 10 Nov 2023 05:36:50 +0900 Subject: [PATCH] Skip KTLS test if the host kernel is older than 5.11 The ktls.sh test currently only supports kernel 5.11+. This needs to be checked at run time, as the koji builder might be using a different version of kernel on the host than the one indicated by the kernel-devel package. Resolves: #2247135 Signed-off-by: Daiki Ueno --- gnutls.spec | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gnutls.spec b/gnutls.spec index daf3aff..c8abaa1 100644 --- a/gnutls.spec +++ b/gnutls.spec @@ -373,7 +373,21 @@ rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/ncrypt.dll* %check %if %{with tests} pushd native_build -make check %{?_smp_mflags} GNUTLS_SYSTEM_PRIORITY_FILE=/dev/null + +xfail_tests= + +# The ktls.sh test currently only supports kernel 5.11+. This needs to +# be checked at run time, as the koji builder might be using a different +# version of kernel on the host than the one indicated by the +# kernel-devel package. + +case "$(uname -r)" in + 4.* | 5.[0-9].* | 5.10.* ) + xfail_tests="$xfail_tests ktls.sh" + ;; +esac + +make check %{?_smp_mflags} GNUTLS_SYSTEM_PRIORITY_FILE=/dev/null XFAIL_TESTS="$xfail_tests" popd %endif