diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.D_MACRO_UNUSED.overflow.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.D_MACRO_UNUSED.overflow.ksh index cc1e6dd9f745..3c493dffa50d 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.D_MACRO_UNUSED.overflow.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.D_MACRO_UNUSED.overflow.ksh @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$.d ## Create .d file diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.arguments.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.arguments.ksh index 6ec078abf29d..89c6a6aebb13 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.arguments.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.arguments.ksh @@ -42,7 +42,7 @@ fi dtrace=$1 -bname=`/usr/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.egid.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.egid.ksh index afee24f83b71..2397db6e1b72 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.egid.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.egid.ksh @@ -43,7 +43,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/usr/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$.d ## Create .d file @@ -77,7 +77,7 @@ fi #Get the groupid of the calling process using ps -groupid=`ps -o pid,pgid | grep "$$ " | awk '{print $2}' 2>/dev/null` +groupid=`ps -x -o pid,egid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -93,5 +93,5 @@ fi #Cleanup leftovers -/bin/rm -f $dfilename +rm -f $dfilename exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.euid.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.euid.ksh index 1b6b9b3e0d39..5bdc391dbbc0 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.euid.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.euid.ksh @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -userid=`ps -o pid,uid | grep "$$ " | awk '{print $2}' 2>/dev/null` +userid=`ps -x -o pid,uid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.gid.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.gid.ksh index 332b8e70d27d..0c4e77b54e4f 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.gid.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.gid.ksh @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -groupid=`ps -o pid,gid | grep "$$ " | awk '{print $2}' 2>/dev/null` +groupid=`ps -x -o pid,gid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.ppid.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.ppid.ksh index bbd9a5364797..37613ce1a5e1 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.ppid.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.ppid.ksh @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$.d ## Create .d file @@ -75,12 +75,12 @@ fi #Pass current pid (I mean parent pid for .d script). -$dfilename $$ >/dev/null 2>&1 +$dfilename $$ #>/dev/null 2>&1 if [ $? -ne 0 ]; then print -u2 "Error in executing $dfilename" exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.projid.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.projid.ksh index 62bc817af5f6..e11f1e56b47d 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.projid.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.projid.ksh @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -projectid=`ps -o pid,projid | grep "$$ " | awk '{print $2}' 2>/dev/null` +projectid=`ps -x -o pid,projid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.sid.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.sid.ksh index 477ebc0290a5..08a65b2d62dc 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.sid.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.sid.ksh @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -sessionid=`ps -o pid,sid | grep "$$ " | awk '{print $2}' 2>/dev/null` +sessionid=`ps -x -o pid,sid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get sid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.stringmacro.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.stringmacro.ksh index 724bd5fda7f0..a8b1ec1fe61e 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.stringmacro.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.stringmacro.ksh @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$.d ## Create .d file diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.taskid.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.taskid.ksh index 88b450d381ff..e4de7fbfd3d4 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.taskid.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.taskid.ksh @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -taskidval=`ps -o pid,taskid | grep "$$ " | awk '{print $2}' 2>/dev/null` +taskidval=`ps -x -o pid,taskid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.uid.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.uid.ksh index fabf0eda7433..8cd6130ff644 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.uid.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scripting/tst.uid.ksh @@ -41,7 +41,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -bname=`/bin/basename $0` +bname=`basename $0` dfilename=/var/tmp/$bname.$$ ## Create .d file @@ -69,7 +69,7 @@ EOF chmod 555 $dfilename -userid=`ps -o pid,uid | grep "$$ " | awk '{print $2}' 2>/dev/null` +userid=`ps -x -o pid,uid | grep "$$ " | awk '{print $2}' 2>/dev/null` if [ $? -ne 0 ]; then print -u2 "unable to get uid of the current process with pid = $$" exit 1 @@ -82,5 +82,5 @@ if [ $? -ne 0 ]; then exit 1 fi -#/bin/rm -f $dfilename +rm -f $dfilename exit 0