Fix FTBS by running p11 tests individually

The tests in src/lib/test ran through p11test driver. When CPPUNIT runs
them, the order is not guaranteed and tests fail differently each run.
When individual test suites being run as `p11test TestName`, they all
succeed.

Switch test runs to explicit order.

Related: RHEL-24824

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Alexander Bokovoy 2024-02-08 11:19:13 +02:00
parent a62367119d
commit 120ca1bb7c
1 changed files with 18 additions and 2 deletions

View File

@ -4,7 +4,7 @@
Summary: Software version of a PKCS#11 Hardware Security Module
Name: softhsm
Version: 2.6.1
Release: %{?prever:0.}7%{?prever:.%{prever}}%{?dist}.2
Release: %{?prever:0.}8%{?prever:.%{prever}}%{?dist}
License: BSD
Url: http://www.opendnssec.org/
Source: http://dist.opendnssec.org/source/%{?prever:testing/}%{name}-%{version}.tar.gz
@ -70,7 +70,19 @@ autoreconf -fiv
%make_build
%check
make check
for d in crypto data_mgr handle_mgr object_store session_mgr slot_mgr ; do
make check -C src/lib/$d
done
pushd src/lib/test
make p11test
for t in TokenTests AsymWrapUnwrapTests DigestTests ForkTests \
InitTests InfoTests SessionTests UserTests RandomTests \
SignVerifyTests AsymEncryptDecryptTests DeriveTests \
ObjectTests SymmetricAlgorithmTests ; do
./p11test $t
done
popd
%install
rm -rf %{buildroot}
@ -121,6 +133,10 @@ if [ -f /var/softhsm/slot0.db ]; then
fi
%changelog
* Thu Feb 08 2024 Alexander Bokovoy <abokovoy@redhat.com> - 2.6.1-8
- Run p11test tests individually
- Resolves: rhbz#2261703
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.6.1-7.2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688