| Summary: | Suboptimal shell code in nss.spec | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Hubert Kario <hkario> | ||||
| Component: | nss | Assignee: | Elio Maldonado Batiz <emaldona> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Hubert Kario <hkario> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 5.11 | CC: | hkario, rrelyea | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | nss-3.15.3-5.el5 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1087507 (view as bug list) | Environment: | |||||
| Last Closed: | 2014-09-16 05:39:24 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: | |||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1087507 | ||||||
| Attachments: |
|
||||||
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release. See https://bugzilla.redhat.com/show_bug.cgi?id=1002642#c11 for the proposed improvement to the spec file handling of test failures and avoid false positives when output.log isn't present. https://bugzilla.redhat.com/show_bug.cgi?id=1002642#c11 caused build failures.I'll attach a new version that Hubert and I worked on. Created attachment 879984 [details]
specfile changes for better error detection in patch format
This version properly handles the case of missing test output.log.
Comment on attachment 879984 [details]
specfile changes for better error detection in patch format
As Hubert and I were collaborators on this I must add an additional reviewer :-)
Comment on attachment 879984 [details]
specfile changes for better error detection in patch format
r+
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, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2014-1246.html |
Description of problem: Checking if test suite passed can provide false positive when the output.log is missing. Version-Release number of selected component (if applicable): nss-3.15.3-1.el5_10 How reproducible: always Steps to Reproduce: 1. open nss.spec 2. look for '%check' section Actual results: TEST_FAILURES=`grep -c FAILED ./nss-%{fips_source_version}/mozilla/tests_results/security/localhost.1/output.log` || : if [ $TEST_FAILURES -ne 0 ]; then echo "error: test suite returned failure(s)" exit 1 fi TEST_FAILURES=`grep -c FAILED ./tests_results/security/localhost.1/output.log` || : if [ $TEST_FAILURES -ne 0 ]; then echo "error: test suite returned failure(s)" exit 1 fi Expected results: failures from grep handled (either missing file or crash) and default value used when TEST_FAILURES is unset. Additional info: