Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1035281 - Suboptimal shell code in nss.spec
Suboptimal shell code in nss.spec
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: nss (Show other bugs)
5.11
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Elio Maldonado Batiz
Hubert Kario
:
Depends On:
Blocks: 1087507
  Show dependency treegraph
 
Reported: 2013-11-27 08:02 EST by Hubert Kario
Modified: 2014-09-16 01:39 EDT (History)
2 users (show)

See Also:
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 01:39:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:1246 normal SHIPPED_LIVE Moderate: nss and nspr security, bug fix, and enhancement update 2014-09-16 05:39:01 EDT

  None (edit)
Description Hubert Kario 2013-11-27 08:02:56 EST
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 Product and Program Management 2014-01-22 11:21:59 EST
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 12:06:34 EDT
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 14:38:41 EDT
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 14:42:43 EDT
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 14:46:29 EDT
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 17:40:19 EDT
Comment on attachment 879984 [details]
specfile changes for better error detection in patch format

r+
Comment 11 errata-xmlrpc 2014-09-16 01:39:24 EDT
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.