Bug 2051083

Summary: failed selftest is not blocking the build
Product: Red Hat Enterprise Linux 9 Reporter: Ondrej Moriš <omoris>
Component: stunnelAssignee: Clemens Lang <cllang>
Status: CLOSED ERRATA QA Contact: Ondrej Moriš <omoris>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 9.0Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: stunnel-5.62-2.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 16:02:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ondrej Moriš 2022-02-06 09:50:01 UTC
Description of problem:

During the build process of stunnel, selftest is executed ('make check') but its result seems to be ignored. Hence build continues even if selftest failed.

Version-Release number of selected component (if applicable):

stunnel-5.62-1.el9

How reproducible:

100%

Steps to Reproduce:

1. Compile the source rpm (rpmbuild -vv -bc).
2. Make selftest fail somehow.
3. Execute the failing self test.

Actual results:

Summary:
   success: 47
   fail: 3
   skipped: 0
File /builddir/build/BUILD/stunnel-5.62/tests/logs/results.log done
Processing files: stunnel-5.62-1.el9.x86_64

Expected results:

Build is aborted.

Additional info:

N/A

Comment 1 Clemens Lang 2022-02-07 10:03:19 UTC
The issue is

  %check
  make test || (for i in tests/logs/*.log ; do echo "$i": ; cat "$i" ; done)

which will hide the non-zero exit code of make. I'll fit it.

Comment 4 Clemens Lang 2022-02-07 14:23:47 UTC
I manually verified that an error in make test now fails the build by applying this patch:

diff --git a/stunnel.spec b/stunnel.spec
index b2a3fd4..ab6a425 100644
--- a/stunnel.spec
+++ b/stunnel.spec
@@ -100,7 +100,7 @@ cp %{SOURCE7} %{buildroot}%{_unitdir}/%{name}@.service
 %endif

 %check
-if ! make test; then
+if ! ( make test && false ); then
        for i in tests/logs/*.log; do
                echo "$i":
                cat "$i"

Comment 9 errata-xmlrpc 2022-05-17 16:02:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: stunnel), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:4036