Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 879984 Details for
Bug 1035281
Suboptimal shell code in nss.spec
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
specfile changes for better error detection in patch format
nss-specfile_BetterErrorHanding.patch (text/plain), 3.84 KB, created by
Elio Maldonado Batiz
on 2014-03-28 18:42:43 UTC
(
hide
)
Description:
specfile changes for better error detection in patch format
Filename:
MIME Type:
Creator:
Elio Maldonado Batiz
Created:
2014-03-28 18:42:43 UTC
Size:
3.84 KB
patch
obsolete
>diff --git a/nss.spec b/nss.spec >index 6106622..b9f5a3d 100644 >--- a/nss.spec >+++ b/nss.spec >@@ -8,7 +8,7 @@ > Summary: Network Security Services > Name: nss > Version: 3.15.3 >-Release: 4%{?dist} >+Release: 5%{?dist} > License: MPLv2.0 > URL: http://www.mozilla.org/projects/security/pki/nss/ > Group: System Environment/Libraries >@@ -583,12 +583,32 @@ HOST=localhost DOMSUF=localdomain PORT=$MYRAND NSS_CYCLES=%{?nss_cycles} NSS_TES > > popd > >+# Normally, the grep exit status is 0 if selected lines are found and 1 otherwise, >+# Grep exits with status greater than 1 if an error ocurred. >+# If there are test failures we expect TEST_FAILURES > 0 and GREP_EXIT_STATUS = 0, >+# With no test failures we expect TEST_FAILURES = 0 and GREP_EXIT_STATUS = 1, whereas >+# GREP_EXIT_STATUS > 1 would indicate an error in grep such as failure to find the log file. > killall $RANDSERV || : > >-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 >+TEST_FAILURES=$(grep -c FAILED ./nss-softokn-util-%{fips_source_version}/mozilla/tests_results/security/localhost.1/output.log) || GREP_EXIT_STATUS=$? >+if [ ${GREP_EXIT_STATUS:-0} -eq 1 ]; then >+ echo "okay: test suite detected no failures" >+else >+ if [ ${GREP_EXIT_STATUS:-0} -eq 0 ]; then >+ # while a situation in which grep return status is 0 and it doesn't output >+ # anything shouldn't happen, set the default to something that is >+ # obviously wrong (-1) >+ echo "error: test suite had ${TEST_FAILURES:--1} test failure(s)" >+ exit 1 >+ else >+ if [ ${GREP_EXIT_STATUS:-0} -eq 2 ]; then >+ echo "error: grep has not found log file" >+ exit 1 >+ else >+ echo "error: grep failed with exit code: ${GREP_EXIT_STATUS}" >+ exit 1 >+ fi >+ fi > fi > echo "cipher test suite completed" > >@@ -651,12 +671,32 @@ HOST=localhost DOMSUF=localdomain PORT=$MYRAND NSS_CYCLES=%{?nss_cycles} NSS_TES > > popd > >+# Normally, the grep exit status is 0 if selected lines are found and 1 otherwise, >+# Grep exits with status greater than 1 if an error ocurred. >+# If there are test failures we expect TEST_FAILURES > 0 and GREP_EXIT_STATUS = 0, >+# With no test failures we expect TEST_FAILURES = 0 and GREP_EXIT_STATUS = 1, whereas >+# GREP_EXIT_STATUS > 1 would indicate an error in grep such as failure to find the log file. > killall $RANDSERV || : > >-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 >+TEST_FAILURES=$(grep -c FAILED ./tests_results/security/localhost.1/output.log) || GREP_EXIT_STATUS=$? >+if [ ${GREP_EXIT_STATUS:-0} -eq 1 ]; then >+ echo "okay: test suite detected no failures" >+else >+ if [ ${GREP_EXIT_STATUS:-0} -eq 0 ]; then >+ # while a situation in which grep return status is 0 and it doesn't output >+ # anything shouldn't happen, set the default to something that is >+ # obviously wrong (-1) >+ echo "error: test suite had ${TEST_FAILURES:--1} test failure(s)" >+ exit 1 >+ else >+ if [ ${GREP_EXIT_STATUS:-0} -eq 2 ]; then >+ echo "error: grep has not found log file" >+ exit 1 >+ else >+ echo "error: grep failed with exit code: ${GREP_EXIT_STATUS}" >+ exit 1 >+ fi >+ fi > fi > echo "test suite completed" > >@@ -896,6 +936,10 @@ done > > > %changelog >+* Thu Mar 27 2014 Elio Maldonado <emaldona@redhat.com> - 3.15.3-5 >+- Improve shell code for error detection on %%check section >+- Resolves: Bug 1035281 - Suboptimal shell code in nss.spec >+ > * Fri Dec 13 2013 Elio Maldonado <emaldona@redhat.com> - 3.15.3-4 > - Revoke trust in one mis-issued anssi certificate > - Resolves: Bug 1042684 - nss: Mis-issued ANSSI/DCSSI certificate (MFSA 2013-117)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
hkario
: review+
rrelyea
: review+
Actions:
View
|
Diff
Attachments on
bug 1035281
: 879984