Mercurial > hg > openjdk > bsd-port > jdk
changeset 5823:dddebb6016bd
7104161: test/sun/tools/jinfo/Basic.sh fails on Ubuntu
Reviewed-by: alanb
author | weijun |
---|---|
date | Thu, 27 Oct 2011 17:23:25 +0800 |
parents | b136c427bd0e |
children | 68427d98767e |
files | test/sun/tools/jinfo/Basic.sh |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/test/sun/tools/jinfo/Basic.sh Fri Jun 24 19:30:39 2011 +0100 +++ b/test/sun/tools/jinfo/Basic.sh Thu Oct 27 17:23:25 2011 +0800 @@ -44,7 +44,19 @@ failed=0 -if [ $isWindows = false ]; then +runSA=true + +if [ $isLinux = true ]; then + # Some Linux systems disable non-child ptrace (see 7050524) + ptrace_scope=`/sbin/sysctl -n kernel.yama.ptrace_scope` + if [ $? = 0 ]; then + if [ $ptrace_scope = 1 ]; then + runSA=false + fi + fi +fi + +if [ $runSA = true ]; then # -sysprops option ${JINFO} -J-XX:+UsePerfData -sysprops $appJavaPid if [ $? != 0 ]; then failed=1; fi