From cae9bd9983c0a1a05c80d7c5ec0e4a1a98e62f72 Mon Sep 17 00:00:00 2001 From: weijun Date: Thu, 27 Oct 2011 17:23:25 +0800 Subject: [PATCH] 7104161: test/sun/tools/jinfo/Basic.sh fails on Ubuntu Reviewed-by: alanb --- test/sun/tools/jinfo/Basic.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/sun/tools/jinfo/Basic.sh b/test/sun/tools/jinfo/Basic.sh index 9d5cb468f..432dd62b4 100644 --- a/test/sun/tools/jinfo/Basic.sh +++ b/test/sun/tools/jinfo/Basic.sh @@ -44,7 +44,19 @@ set +e 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 -- GitLab