comparison test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh @ 6252:ae5d04dbacd6

8003890: corelibs test scripts should pass TESTVMOPTS Reviewed-by: chegar, alanb Contributed-by: Mark Sheppard <mark.sheppard@oracle.com>
author chegar
date Thu, 13 Dec 2012 14:47:35 +0000
parents 00cd9dc3c2b5
children 7da291690aa0
comparison
equal deleted inserted replaced
1:140554c9f8f0 2:c8874035a95b
99 mp=-Dcom.sun.management.config.file=${MGMT} 99 mp=-Dcom.sun.management.config.file=${MGMT}
100 pp=-Dcom.sun.management.jmxremote.port=4999 100 pp=-Dcom.sun.management.jmxremote.port=4999
101 101
102 go() { 102 go() {
103 echo '' 103 echo ''
104 sh -xc "$JAVA $1 $2 $3 $4 $5 $6 $7 $8" 2>&1 104 sh -xc "$JAVA ${TESTVMOPTS} $1 $2 $3 $4 $5 $6 $7 $8" 2>&1
105 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi 105 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
106 } 106 }
107 107
108 # Test 1 - SSL config file is secure - VM should start 108 # Test 1 - SSL config file is secure - VM should start
109 chmod 700 ${SSL} 109 chmod 700 ${SSL}
110 sh -xc "$JAVA $mp $pp Dummy" 2>&1 110 sh -xc "$JAVA ${TESTVMOPTS} $mp $pp Dummy" 2>&1
111 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi 111 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
112 112
113 # Test 2 - SSL config file is not secure - VM should fail to start 113 # Test 2 - SSL config file is not secure - VM should fail to start
114 chmod o+rx ${SSL} 114 chmod o+rx ${SSL}
115 sh -xc "$JAVA $mp $pp Dummy" 2>&1 115 sh -xc "$JAVA ${TESTVMOPTS} $mp $pp Dummy" 2>&1
116 if [ $? = 0 ]; then failures=`expr $failures + 1`; fi 116 if [ $? = 0 ]; then failures=`expr $failures + 1`; fi
117 117
118 # Reset the file permissions on the generated SSL config file 118 # Reset the file permissions on the generated SSL config file
119 chmod 777 ${SSL} 119 chmod 777 ${SSL}
120 120