Due to interesting SH scope phenomenon, need to move read redirect block outside NSS_LIBPKIX_BRANCH
authorhanfei.yu%sun.com
Fri, 11 Nov 2005 15:32:48 +0000
branchNSS_LIBPKIX_BRANCH
changeset 6286 44742190e892aad1df01184f091ba598b958752b
parent 6284 b946d1d383a7ec61ab3dbc05576514a8b677f0f4
child 6295 7e781604a7c64b35564011cc6d995e7668df621f
push idunknown
push userunknown
push dateunknown
Due to interesting SH scope phenomenon, need to move read redirect block outside the function call. So variable value can be executed in the same shell.
security/nss/tests/libpkix/sample_apps/runPerf.sh
--- a/security/nss/tests/libpkix/sample_apps/runPerf.sh
+++ b/security/nss/tests/libpkix/sample_apps/runPerf.sh
@@ -98,38 +98,33 @@ Display "*******************************
                 grep  "(actual leaks:         1  total size:       4 bytes)" ${testOut} > /dev/null 2>&1
                 if [ $? -ne 0 ]; then
                     memErrors=`expr ${memErrors} + 1`
                     failedmempgms="${failedmempgms}${perfPgm} "
                     Display ${testOutMem}
                 fi
             fi
         fi
-    done <<EOF
-libpkix_buildthreads 5 1 ValidCertificatePathTest1EE
-libpkix_buildthreads 5 8 ValidCertificatePathTest1EE
-nss_threads 5 1 ValidCertificatePathTest1EE
-nss_threads 5 8 ValidCertificatePathTest1EE
-EOF
-
+    done
     return ${errors}
 }
 
 
 # If there is race condition bug, may this test catch it...
 loopTest()
 {
     totalLoop=10
 
     Display ""
     Display "*******************************************************************************"
     Display "START OF TESTS FOR PKIX PERFORMANCE SANITY LOOP (${totalLoop} times)"
 Display "*******************************************************************************"
     Display ""
 
+    errors=0
     iLoop=0
     perfPgm="${DIST_BIN}/libpkix_buildthreads 5 8 ValidCertificatePathTest1EE"
 
     while [ $iLoop -lt $totalLoop ]
     do
         iLoop=`expr $iLoop + 1`
 
         Display "Running ${perfPgm}"
@@ -146,17 +141,23 @@ Display "*******************************
     done
 
     return ${errors}
 
 }
 
 #main
 
-perfTest
+perfTest <<EOF
+libpkix_buildthreads 5 1 ValidCertificatePathTest1EE
+libpkix_buildthreads 5 8 ValidCertificatePathTest1EE
+nss_threads 5 1 ValidCertificatePathTest1EE
+nss_threads 5 8 ValidCertificatePathTest1EE
+EOF
+
 totalErrors=$?
 
 loopTest
 totalErrors=`expr ${totalErrors} + $?`
 
 testEndingEcho
 
 exit ${totalErrors}