From 3d486e6132dfbd11ddf33512ca6caad2b5e1564c Mon Sep 17 00:00:00 2001 From: Ondrej Mosnacek Date: Jul 27 2019 20:10:09 +0000 Subject: Backport patch to fix test failure on aarch64 Another patch needed to fix failing tests... Signed-off-by: Ondrej Mosnacek --- diff --git a/003-fix-test-case.patch b/003-fix-test-case.patch new file mode 100644 index 0000000..44521b3 --- /dev/null +++ b/003-fix-test-case.patch @@ -0,0 +1,35 @@ +From b455bb77dcf7a38bb881898efcd5122aa61e68cc Mon Sep 17 00:00:00 2001 +From: Stephan Mueller +Date: Mon, 27 May 2019 13:21:03 +0200 +Subject: [PATCH] fix test case + +- fix possible mem leak + +- fix counting of available memory + +Signed-off-by: Stephan Mueller +--- + test/kcapi-main.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/test/kcapi-main.c b/test/kcapi-main.c +index 46cce51..bce21b7 100644 +--- a/test/kcapi-main.c ++++ b/test/kcapi-main.c +@@ -282,6 +282,7 @@ static int fuzz_init_test(unsigned int size) + + if (get_random(name, size, 0)) { + printf("get_random call failed\n"); ++ free(name); + return 1; + } + +@@ -1016,7 +1017,7 @@ static int cavs_sym_stream(struct kcapi_cavs *cavs_test, uint32_t loops, + } + + outiov.iov_base = (uint8_t *)outiov.iov_base + ret; +- outiov.iov_len += ret; ++ outiov.iov_len -= ret; + outptr += ret; + } + diff --git a/libkcapi.spec b/libkcapi.spec index ed39ebd..35753ee 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: 5%{?dist} +Release: 6%{?dist} Summary: User space interface to the Linux Kernel Crypto API License: BSD or GPLv2 @@ -108,6 +108,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 +Patch3: %{giturl}/commit/b455bb77dcf7.patch#/003-fix-test-case.patch BuildRequires: clang BuildRequires: coreutils @@ -449,6 +450,9 @@ popd %changelog +* Sat Jul 27 2019 Ondrej Mosnáček - 1.1.4-6 +- Backport patch to fix test failure on aarch64 + * Sat Jul 27 2019 Ondrej Mosnáček - 1.1.4-5 - Backport patch to fix tests