Update patch from upstream

This commit is contained in:
Ondrej Mosnacek 2018-08-09 15:35:02 +02:00
parent 47361f07e4
commit 82e795531c
2 changed files with 68 additions and 4 deletions

View File

@ -1,7 +1,7 @@
From 7223cbef97f346026e29de73f547b7074d8f5b94 Mon Sep 17 00:00:00 2001
From: Ondrej Mosnacek <omosnace@redhat.com>
Date: Mon, 6 Aug 2018 15:47:15 +0200
Subject: [PATCH 1/4] test: Remove an unnecessary hack
Subject: [PATCH 1/6] test: Remove an unnecessary hack
---
test/libtest.sh | 2 --
@ -24,7 +24,7 @@ index d969277..2a90d91 100644
From 0bc71e19b51a45dbcc6c3710d3d4ffed0707e68a Mon Sep 17 00:00:00 2001
From: Ondrej Mosnacek <omosnace@redhat.com>
Date: Tue, 7 Aug 2018 09:51:08 +0200
Subject: [PATCH 2/4] test: Allow running tests outside of build environment
Subject: [PATCH 2/6] test: Allow running tests outside of build environment
This patch slightly refactors the test scripts so they can be installed
along with the binaries and ran on the installed system. The old way of
@ -916,7 +916,7 @@ index c4a5c01..64c5d22 100755
From c7707ad1ddcbaa6f6722862cb4de9d3a3ea133b5 Mon Sep 17 00:00:00 2001
From: Ondrej Mosnacek <omosnace@redhat.com>
Date: Tue, 7 Aug 2018 18:43:08 +0200
Subject: [PATCH 3/4] test: Fix platform detection
Subject: [PATCH 3/6] test: Fix platform detection
---
test/libtest.sh | 12 ++++++++++--
@ -967,7 +967,7 @@ index 4a90a00..67be2d1 100644
From 291d62a006945a365645889aabf55549215c1304 Mon Sep 17 00:00:00 2001
From: Ondrej Mosnacek <omosnace@redhat.com>
Date: Thu, 9 Aug 2018 10:24:32 +0200
Subject: [PATCH 4/4] Makefile.am: Add missing test script
Subject: [PATCH 4/6] Makefile.am: Add missing test script
---
Makefile.am | 1 +
@ -985,3 +985,66 @@ index c922f4e..635ccfd 100644
test/hasher-test.sh \
test/compile-test.sh \
test/virttest.sh \
From f782b1070093f8a08fcee3eaf36808ddfe2cca6a Mon Sep 17 00:00:00 2001
From: Ondrej Mosnacek <omosnace@redhat.com>
Date: Thu, 9 Aug 2018 14:35:09 +0200
Subject: [PATCH 5/6] test: Do not fail non-local test if hasher binary is
missing
The test suite should be able to work even if hashers are not installed.
---
test/hasher-test.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/hasher-test.sh b/test/hasher-test.sh
index c9bc03b..df4397a 100755
--- a/test/hasher-test.sh
+++ b/test/hasher-test.sh
@@ -42,8 +42,8 @@ else
binary="$(find_app_binary $hasher)"
if [ ! -x "$(command -v "$binary")" ]
then
- echo "Hasher binary $hasher missing"
- exit 1
+ echo_deact "Hasher binary $hasher missing, tests deactivated"
+ exit 0
fi
done
fi
From 9c741664c2fde9cdddcadb8d92701536ddf872f4 Mon Sep 17 00:00:00 2001
From: Ondrej Mosnacek <omosnace@redhat.com>
Date: Thu, 9 Aug 2018 14:50:36 +0200
Subject: [PATCH 6/6] test: Add test for hasher FIPS self-check
This test will be run only in non-local mode.
---
test/hasher-test.sh | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/test/hasher-test.sh b/test/hasher-test.sh
index df4397a..0a33657 100755
--- a/test/hasher-test.sh
+++ b/test/hasher-test.sh
@@ -285,6 +285,20 @@ do
rm -f $CHKFILE
done
+#
+# Test FIPS self-check:
+#
+[ "$KCAPI_TEST_LOCAL" -ne 1 ] && for hasher in $SUMHASHER $HMACHASHER
+do
+ KCAPI_HASHER_FORCE_FIPS=1 run_hasher $hasher $0 >/dev/null
+ if [ $? -ne 0 ]
+ then
+ echo_fail "FIPS self-check of hasher $hasher failed"
+ else
+ echo_pass "FIPS self-check of hasher $hasher"
+ fi
+done
+
#
# hmaccalc known-answer tests from RFC 2202 and 4231
#

View File

@ -457,6 +457,7 @@ popd
%changelog
* Thu Aug 09 2018 Ondrej Mosnáček <omosnace@redhat.com> - 1.1.1-16
- Add missing dependencies to the tests package
- Update patch from upstream
* Thu Aug 09 2018 Ondrej Mosnáček <omosnace@redhat.com> - 1.1.1-15
- Build and tests require perl