From c3c3d074ac535aaeb6b91e688519ea608ee429a4 Mon Sep 17 00:00:00 2001 From: Ondrej Mosnacek Date: Thu, 25 Aug 2022 20:23:56 +0200 Subject: [PATCH] Add a patch to fix tests with kernels 6.0+ Signed-off-by: Ondrej Mosnacek --- 001-tests-kernel-version.patch | 40 ++++++++++++++++++++++++++++++++++ libkcapi.spec | 2 ++ 2 files changed, 42 insertions(+) create mode 100644 001-tests-kernel-version.patch diff --git a/001-tests-kernel-version.patch b/001-tests-kernel-version.patch new file mode 100644 index 0000000..aa21536 --- /dev/null +++ b/001-tests-kernel-version.patch @@ -0,0 +1,40 @@ +From c2af62dcc7a287f3c14f6aaec5724401c1ea470a Mon Sep 17 00:00:00 2001 +From: Ondrej Mosnacek +Date: Mon, 15 Aug 2022 10:19:50 +0200 +Subject: [PATCH] tests: fix overly-optimistic kernel version checks + +The mainline kernel is now at version 6.0 so these >= 5.99 checks are +now incorrectly enabling tests that don't work. Instead of bumping the +imaginary version and face the same problem again in a couple years, +replace the checks with 'false' and a TODO comment. + +Signed-off-by: Ondrej Mosnacek +Signed-off-by: Stephan Mueller +--- + test/test.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/test/test.sh b/test/test.sh +index 1d9be73..a75b802 100755 +--- a/test/test.sh ++++ b/test/test.sh +@@ -1560,7 +1560,8 @@ else + echo_deact "AEAD tests of copied AAD deactivated" + fi + +-if $(check_min_kernelver 5 99); then ++# TODO add version check when supported upstream ++if false; then + asymfunc 4 + asymfunc 4 -s + asymfunc 4 -v +@@ -1583,7 +1584,8 @@ else + echo_deact "All asymmetric tests deactivated" + fi + +-if $(check_min_kernelver 5 99); then ++# TODO add version check when supported upstream ++if false; then + kppfunc 13 + kppfunc 13 X -m + kppfunc 13 -v diff --git a/libkcapi.spec b/libkcapi.spec index 80f6921..0a6779c 100644 --- a/libkcapi.spec +++ b/libkcapi.spec @@ -133,6 +133,8 @@ Source1: https://www.chronox.de/%{name}/%{name}-%{version}.tar.xz.asc Source2: sha512hmac-openssl.sh Source3: fipshmac-openssl.sh +Patch: %{giturl}/commit/c2af62dcc7a2.patch#/001-tests-kernel-version.patch + BuildRequires: bash BuildRequires: coreutils BuildRequires: gcc