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:
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