8037225: sun/tools/jinfo/Basic.sh fails

Reviewed-by: alanb
This commit is contained in:
Staffan Larsen 2014-03-21 14:45:54 +01:00
parent 966f3bc845
commit 5deaaa84e9
2 changed files with 9 additions and 10 deletions

View File

@ -78,8 +78,16 @@ public class JInfo {
}
if (useSA) {
// SA only supports -flags or -sysprops
if (args[0].startsWith("-")) {
if (!(args[0].equals("-flags") || args[0].equals("-sysprops"))) {
usage(1);
}
}
// invoke SA which does it's own argument parsing
runTool(args);
} else {
// Now we can parse arguments for the non-SA case
String pid = null;

View File

@ -40,6 +40,7 @@ startApplication SimpleApplication "${PORTFILE}"
# all return statuses are checked in this test
set +e
set -x
failed=0
@ -71,16 +72,6 @@ if [ $runSA = true ]; then
# no option
${JINFO} -J-XX:+UsePerfData -F $appJavaPid
if [ $? != 0 ]; then failed=1; fi
# -flag option
${JINFO} -J-XX:+UsePerfData -F -flag +PrintGC $appJavaPid
if [ $? != 0 ]; then failed=1; fi
${JINFO} -J-XX:+UsePerfData -F -flag -PrintGC $appJavaPid
if [ $? != 0 ]; then failed=1; fi
${JINFO} -J-XX:+UsePerfData -F -flag PrintGC $appJavaPid
if [ $? != 0 ]; then failed=1; fi
fi
# -sysprops option