United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6956472 test/runtime/6888954/vmerrors.sh uses ksh-specific syntax
6956472 : test/runtime/6888954/vmerrors.sh uses ksh-specific syntax

Details
Type:
Bug
Submit Date:
2010-05-27
Status:
Closed
Updated Date:
2012-05-02
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
hotspot
OS:
generic
Sub-Component:
test
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs19
Fixed Versions:
hs19

Related Reports
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
Failed during nightly testing:

command: shell vmerrors.sh []
reason: User specified action: run shell vmerrors.sh 
elapsed time (seconds): 0.188
----------System.out:(0/0)----------
----------System.err:(1/126)----------
/export/local/common/testbase/jtreg/HS_REGRESSION/test/runtime/6888954/vmerrors.sh: syntax error at line 68: `i=$' unexpected
result: Failed. Execution failed: exit code 2
This bug affects the following JTREG test in the hotspot repo:

    runtime/6888954/vmerrors.sh

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/5b77884bd4b7
                                     
2010-05-29
EVALUATION

Line 68 is 

    i=$(expr $i + 1) 

but $(...) is not recognized by the bourne shell.  It should be

    i=`expr $i + 1`
                                     
2010-05-27
SUGGESTED FIX

diff --git a/test/runtime/6888954/vmerrors.sh b/test/runtime/6888954/vmerrors.sh 
--- a/test/runtime/6888954/vmerrors.sh 
+++ b/test/runtime/6888954/vmerrors.sh 
@@ -65,7 +65,7 @@ 
     done 
     rm -f $$ 
  
-    i=$(expr $i + 1) 
+    i=`expr $i + 1` 
 done 
  
 exit $rc
                                     
2010-05-27



Hardware and Software, Engineered to Work Together