Change expected test failures in FIPS mode

Resolves: RHEL-64698
This commit is contained in:
Veronika Hanulíková 2024-11-14 14:35:25 +01:00
parent f2f9d59e62
commit 6f705ebb1b

View File

@ -60,11 +60,18 @@ every software/card that does so, too.
%patch 8 -p1 -b .file-cache
%patch 9 -p1 -b .sast
# The test-pkcs11-tool-allowed-mechanisms already works in Fedora
sed -i -e '/XFAIL_TESTS/,$ {
s/XFAIL_TESTS.*/XFAIL_TESTS=test-pkcs11-tool-test-threads.sh test-pkcs11-tool-test.sh/
XFAIL_TESTS="test-pkcs11-tool-test-threads.sh test-pkcs11-tool-test.sh"
# In FIPS mode, OpenSSL doesn't allow RSA-PKCS, this is hardcoded into OpenSSL
# and we cannot influence it. Hence, the test is expected to fail in FIPS mode.
if [[ -f "/proc/sys/crypto/fips_enabled" && $(cat /proc/sys/crypto/fips_enabled) == "1" ]]; then
XFAIL_TESTS+=" test-pkcs11-tool-unwrap-wrap-test.sh test-p11test.sh"
fi
sed -i -e "/XFAIL_TESTS/,$ {
s/XFAIL_TESTS.*/XFAIL_TESTS=$XFAIL_TESTS/
q
}' tests/Makefile.am
}" tests/Makefile.am
cp -p src/pkcs15init/README ./README.pkcs15init