Bug 1035281 - Suboptimal shell code in nss.spec
Summary: Suboptimal shell code in nss.spec
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: nss
Version: 5.11
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Elio Maldonado Batiz
QA Contact: Hubert Kario
URL:
Whiteboard:
Depends On:
Blocks: 1087507
TreeView+ depends on / blocked
 
Reported: 2013-11-27 13:02 UTC by Hubert Kario
Modified: 2014-09-16 05:39 UTC (History)
2 users (show)

Fixed In Version: nss-3.15.3-5.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1087507 (view as bug list)
Environment:
Last Closed: 2014-09-16 05:39:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
specfile changes for better error detection in patch format (3.84 KB, patch)
2014-03-28 18:42 UTC, Elio Maldonado Batiz
hkario: review+
rrelyea: review+
Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:1246 0 normal SHIPPED_LIVE Moderate: nss and nspr security, bug fix, and enhancement update 2014-09-16 09:39:01 UTC

Description Hubert Kario 2013-11-27 13:02:56 UTC
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:

Comment 1 RHEL Program Management 2014-01-22 16:21:59 UTC
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.

Comment 2 Elio Maldonado Batiz 2014-03-27 16:06:34 UTC
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.

Comment 4 Elio Maldonado Batiz 2014-03-28 18:38:41 UTC
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.

Comment 5 Elio Maldonado Batiz 2014-03-28 18:42:43 UTC
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 6 Elio Maldonado Batiz 2014-03-28 18:46:29 UTC
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 7 Bob Relyea 2014-03-28 21:40:19 UTC
Comment on attachment 879984 [details]
specfile changes for better error detection in patch format

r+

Comment 11 errata-xmlrpc 2014-09-16 05:39:24 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, 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


Note You need to log in before you can comment on or make changes to this bug.