diff --git a/002-Enable-testing-on-kernels-5.0.patch b/002-Enable-testing-on-kernels-5.0.patch new file mode 100644 index 0000000..24b437c --- /dev/null +++ b/002-Enable-testing-on-kernels-5.0.patch @@ -0,0 +1,65 @@ +From 4529c9d0583654fcdc74de09b5de5edcf6959b04 Mon Sep 17 00:00:00 2001 +From: Stephan Mueller +Date: Mon, 27 May 2019 11:33:16 +0200 +Subject: [PATCH] Enable testing on kernels >= 5.0 + +Signed-off-by: Stephan Mueller +--- + test/libtest.sh | 6 +++++- + test/test.sh | 11 ++++++++--- + 2 files changed, 13 insertions(+), 4 deletions(-) + +diff --git a/test/libtest.sh b/test/libtest.sh +index 93b2c93..5a1377b 100644 +--- a/test/libtest.sh ++++ b/test/libtest.sh +@@ -128,7 +128,11 @@ check_min_kernelver() { + major=$1 + minor=$2 + +- if [ $(uname -r | cut -d"." -f1) -ge $major ]; then ++ if [ $(uname -r | cut -d"." -f1) -gt $major ]; then ++ return 0 ++ fi ++ ++ if [ $(uname -r | cut -d"." -f1) -eq $major ]; then + if [ $(uname -r | cut -d"." -f2) -ge $minor ]; then + return 0 + fi +diff --git a/test/test.sh b/test/test.sh +index 6320ad0..96136c5 100755 +--- a/test/test.sh ++++ b/test/test.sh +@@ -907,8 +907,13 @@ kppfunc() + rfc4106_aad_iv() { + assoc=$1 + iv=$2 ++ + # New name with 4.2 +- if [ $(uname -r | cut -d"." -f1) -ge 4 ]; then ++ if [ $(uname -r | cut -d"." -f1) -gt 4 ]; then ++ assoc="${assoc}${iv}" ++ fi ++ ++ if [ $(uname -r | cut -d"." -f1) -eq 4 ]; then + if [ $(uname -r | cut -d"." -f2) -ge 2 ]; then + assoc="${assoc}${iv}" + fi +@@ -1549,7 +1554,7 @@ else + echo_deact "AEAD tests of copied AAD deactivated" + fi + +-if $(check_min_kernelver 4 99); then ++if $(check_min_kernelver 5 99); then + asymfunc 4 + asymfunc 4 -s + asymfunc 4 -v +@@ -1572,7 +1577,7 @@ else + echo_deact "All asymmetric tests deactivated" + fi + +-if $(check_min_kernelver 4 99); then ++if $(check_min_kernelver 5 99); then + kppfunc 13 + kppfunc 13 X -m + kppfunc 13 -v diff --git a/libkcapi.spec b/libkcapi.spec index 6fac283..ed39ebd 100644 --- a/libkcapi.spec +++ b/libkcapi.spec @@ -97,7 +97,7 @@ bin/kcapi-hasher -n fipshmac -d "$lib_path"/fipscheck \\\ Name: libkcapi Version: %{vmajor}.%{vminor}.%{vpatch} -Release: 4%{?dist} +Release: 5%{?dist} Summary: User space interface to the Linux Kernel Crypto API License: BSD or GPLv2 @@ -107,6 +107,7 @@ Source1: http://www.chronox.de/%{name}/%{name}-%{version}.tar.xz.asc Patch0: %{giturl}/commit/52620ec798a5.patch#/000-Fix-build-with-gcc-8.2.x.patch Patch1: 001-workaround-cppcheck-bug.patch +Patch2: %{giturl}/commit/4529c9d05836.patch#/002-Enable-testing-on-kernels-5.0.patch BuildRequires: clang BuildRequires: coreutils @@ -448,6 +449,9 @@ popd %changelog +* Sat Jul 27 2019 Ondrej Mosnáček - 1.1.4-5 +- Backport patch to fix tests + * Thu Jul 25 2019 Ondrej Mosnáček - 1.1.4-4 - Work around cppcheck issue - Enable gating