71 os=`uname -s`
72 if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
73 echo "Test not designed to run on this operating system, skipping..."
74 exit 0
75 fi
76
77 # Create management and SSL configuration files
78
79 LIBDIR=${TESTCLASSES}/lib
80 MGMT=${LIBDIR}/management.properties
81 SSL=${LIBDIR}/jmxremote.ssl.config
82 rm -f ${MGMT}
83 rm -f ${SSL}
84 mkdir ${LIBDIR} 2>&1
85 createJavaFile ${TESTCLASSES} Dummy
86 createManagementConfigFile ${MGMT} ${SSL}
87 createSSLConfigFile ${SSL} ${TESTSRC}/ssl/keystore
88
89 # Compile test
90
91 ${TESTJAVA}/bin/javac -d ${TESTCLASSES} ${TESTCLASSES}/Dummy.java
92
93 JAVA=${TESTJAVA}/bin/java
94 CLASSPATH=${TESTCLASSES}
95 export CLASSPATH
96
97 failures=0
98
99 mp=-Dcom.sun.management.config.file=${MGMT}
100 pp=-Dcom.sun.management.jmxremote.port=4999
101
102 go() {
103 echo ''
104 sh -xc "$JAVA ${TESTVMOPTS} $1 $2 $3 $4 $5 $6 $7 $8" 2>&1
105 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
106 }
107
108 # Test 1 - SSL config file is secure - VM should start
109 chmod 700 ${SSL}
110 sh -xc "$JAVA ${TESTVMOPTS} $mp $pp Dummy" 2>&1
111 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
|
71 os=`uname -s`
72 if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
73 echo "Test not designed to run on this operating system, skipping..."
74 exit 0
75 fi
76
77 # Create management and SSL configuration files
78
79 LIBDIR=${TESTCLASSES}/lib
80 MGMT=${LIBDIR}/management.properties
81 SSL=${LIBDIR}/jmxremote.ssl.config
82 rm -f ${MGMT}
83 rm -f ${SSL}
84 mkdir ${LIBDIR} 2>&1
85 createJavaFile ${TESTCLASSES} Dummy
86 createManagementConfigFile ${MGMT} ${SSL}
87 createSSLConfigFile ${SSL} ${TESTSRC}/ssl/keystore
88
89 # Compile test
90
91 ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES} ${TESTCLASSES}/Dummy.java
92
93 JAVA=${TESTJAVA}/bin/java
94 CLASSPATH=${TESTCLASSES}
95 export CLASSPATH
96
97 failures=0
98
99 mp=-Dcom.sun.management.config.file=${MGMT}
100 pp=-Dcom.sun.management.jmxremote.port=4999
101
102 go() {
103 echo ''
104 sh -xc "$JAVA ${TESTVMOPTS} $1 $2 $3 $4 $5 $6 $7 $8" 2>&1
105 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
106 }
107
108 # Test 1 - SSL config file is secure - VM should start
109 chmod 700 ${SSL}
110 sh -xc "$JAVA ${TESTVMOPTS} $mp $pp Dummy" 2>&1
111 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
|