Closed Bug 1128367 Opened 5 years ago Closed 5 years ago

syntax errors in some of the test shell scripts

Categories

(NSS :: Test, defect)

3.18
x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: elio.maldonado.batiz, Assigned: elio.maldonado.batiz)

References

Details

Attachments

(1 file, 1 obsolete file)

all.sh, cipher.sh and dbtest.sh contanis syntax errors in some of their comparisons.
In all.sh
if [ ${NSS_BUILD_SOFTOKEN_ONLY} -eq "1" ]; then
should be
+if [ ${NSS_BUILD_SOFTOKEN_ONLY} = "1" ]; then

In cipher.sh
 if [ ! -x ${DIST}/${OBJDIR}/bin/bltest${PROG_SUFFIX} ]; then
     echo "bltest not built, skipping this test." >> ${LOGFILE}
    res = 0 <----- spaces  
caused Red Hat tools to complain "error: cannot find the res command"
It should be changed to
    res=0
For dbtest two if [$UID -ne 0] then statments are missing ";"
Fix is
-    if [ $UID -ne 0 ] then
+    if [ $UID -ne 0 ]; then
This one is also deteected by the shell
$ sh -n tests/dbtests/dbtests.sh 
tests/dbtests/dbtests.sh: line 181: syntax error near unexpected token `else'
tests/dbtests/dbtests.sh: line 181: `    else'
Assignee: nobody → emaldona
add a fix for common/init.sh to the previous one.
Attachment #8557688 - Attachment is obsolete: true
Attachment #8557722 - Flags: review?(kaie)
Comment on attachment 8557722 [details] [diff] [review]
Fixes shell syntax errors in some shell scripts

r=kaie
Attachment #8557722 - Flags: review?(kaie) → review+
https://hg.mozilla.org/projects/nss/rev/e8d9e0ebf355
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.18
You need to log in before you can comment on or make changes to this bug.