Bug 821933

Summary: Check does not properly halt execution when running in CK_FORK=no mode and a test fails
Product: [Fedora] Fedora Reporter: Stephen Gallagher <sgallagh>
Component: checkAssignee: Jerry James <loganjerry>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 17CC: loganjerry, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-27 01:55:39 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:
Attachments:
Description Flags
Patch to Fedora Git including upstream patch for the issue loganjerry: review+

Description Stephen Gallagher 2012-05-15 19:13:34 UTC
Created attachment 584766 [details]
Patch to Fedora Git including upstream patch for the issue

Description of problem:
Check does not properly halt execution when running in CK_FORK=no mode and a test fails. In CK_FORK=yes (the default) mode, check calls exit(1) if a test fails. This is safe, because the test is run in a forked process. In non-forking mode, more changes are required.

Version-Release number of selected component (if applicable):
check-0.9.8-4.fc17.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Create a set of unit tests with check including one that should fail.
2. Have it print something after the failure.
  
Actual results:
The printed message is seen.

Expected results:
The test case should not progress past the failed assertion.


Additional info:
I am attaching a patch from upstream that fixes this issue. Please review it and update the Fedora package.

Comment 1 Jerry James 2012-05-15 22:28:35 UTC
The patch looks reasonable.  I've tried it with a number of tests, and it has behaved as I expected so far.  I will build this for Rawhide, F-16, and F-17 now, and we can continue to try it out while it sits in the testing repos.  I probably won't update F-15 at this point unless someone begs me.

Comment 2 Fedora Update System 2012-05-15 23:04:39 UTC
check-0.9.8-5.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/check-0.9.8-5.fc17

Comment 3 Fedora Update System 2012-05-15 23:04:49 UTC
check-0.9.8-5.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/check-0.9.8-5.fc16

Comment 4 Fedora Update System 2012-05-18 10:37:52 UTC
Package check-0.9.8-5.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing check-0.9.8-5.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-8070/check-0.9.8-5.fc16
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-05-27 01:55:39 UTC
check-0.9.8-5.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2012-05-28 01:27:47 UTC
check-0.9.8-5.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Jerry James 2014-06-16 16:12:23 UTC
Comment on attachment 584766 [details]
Patch to Fedora Git including upstream patch for the issue

Marking this attachment as reviewed to get Bugzilla to stop sending me nag emails about it, even though the bug has been closed for a long time.