changeset 13350:a4d1acb7a7f5

922 SUNWdtrt needs some love Reviewed by: Eric Schrock <eric.schrock@delphix.com> Reviewed by: Dan McDonald <danmcd@nexenta.com> Reviewed by: Garrett D'Amore <garrett@nexenta.com> Approved by: Garrett D'Amore <garrett@nexenta.com>
author Richard Lowe <richlowe@richlowe.net>
date Tue, 19 Apr 2011 13:31:18 -0400
parents 06962a3446ee
children b27fbdda9454
files usr/src/cmd/dtrace/test/tst/common/mdb/tst.dtracedcmd.ksh usr/src/cmd/dtrace/test/tst/common/misc/tst.include.ksh usr/src/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out usr/src/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh usr/src/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh usr/src/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh usr/src/cmd/dtrace/test/tst/common/safety/tst.violentdeath.ksh usr/src/cmd/dtrace/test/tst/common/ustack/tst.spin.ksh usr/src/lib/libreparse/common/fs_reparse_lib.c usr/src/uts/common/fs/fs_reparse.h
diffstat 10 files changed, 19 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/dtrace/test/tst/common/mdb/tst.dtracedcmd.ksh	Mon Apr 25 12:59:44 2011 -0400
+++ b/usr/src/cmd/dtrace/test/tst/common/mdb/tst.dtracedcmd.ksh	Tue Apr 19 13:31:18 2011 -0400
@@ -24,8 +24,6 @@
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 #
 # This script primarily tests that the ::dtrace dcmd is not dumping
@@ -36,7 +34,7 @@
 
 script()
 {
-	$dtrace -o $dtraceout -s /dev/stdin <<EOF
+	exec $dtrace -o $dtraceout -s /dev/stdin <<EOF
 	syscall:::entry
 	{
 		@[probefunc] = count();
--- a/usr/src/cmd/dtrace/test/tst/common/misc/tst.include.ksh	Mon Apr 25 12:59:44 2011 -0400
+++ b/usr/src/cmd/dtrace/test/tst/common/misc/tst.include.ksh	Tue Apr 19 13:31:18 2011 -0400
@@ -23,7 +23,6 @@
 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 
 if [ $# != 1 ]; then
 	echo expected one argument: '<'dtrace-path'>'
@@ -83,13 +82,14 @@
 # because they include static globals (!) or function bodies (!!) in the header
 # file.  Hopefully these remain sufficiently few that the O(#files * #badfiles)
 # algorithm, below, doesn't become a problem.  (And yes, writing scripts in
-# something other than ksh1888 would probably be a good idea.)  If this script
+# something other than ksh would probably be a good idea.)  If this script
 # becomes a problem, kindly fix it by reducing the number of bad files!  (That
 # is, fix it by fixing the broken file, not the broken script.)
 #
-badfiles="ctype.h eri_msg.h ser_sync.h sbpro.h neti.h hook_event.h \
+badfiles="ctype.h ser_sync.h neti.h hook_event.h \
     bootconf.h bootstat.h dtrace.h dumphdr.h exacct_impl.h fasttrap.h \
-    kobj.h kobj_impl.h ksyms.h lockstat.h smedia.h stat.h utsname.h"
+    kobj.h kobj_impl.h ksyms.h lockstat.h smedia.h stat.h utsname.h \
+    rds.h smbios_impl.h"
 
 for inc in $files; do
 	file=`basename $inc`
--- a/usr/src/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out	Mon Apr 25 12:59:44 2011 -0400
+++ b/usr/src/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out	Tue Apr 19 13:31:18 2011 -0400
@@ -4,12 +4,15 @@
 FUNCTION NAME
 read entry
 readlink entry
+readlinkat entry
 readv entry
 FUNCTION NAME
 read entry
 readlink entry
+readlinkat entry
 readv entry
 FUNCTION NAME
 readlink entry
+readlinkat entry
 FUNCTION NAME
 pread64 entry
--- a/usr/src/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh	Mon Apr 25 12:59:44 2011 -0400
+++ b/usr/src/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh	Tue Apr 19 13:31:18 2011 -0400
@@ -23,7 +23,6 @@
 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 
 script()
 {
@@ -61,10 +60,9 @@
 
 #
 # The only thing we can be sure of here is that we caught some function in
-# ksh doing work.  (This actually goes one step further and assumes that we
-# catch some non-static function in ksh.)
+# ksh doing work.
 #
-script | tee /dev/fd/2 | grep 'ksh`[a-zA-Z_]' > /dev/null
+script | tee /dev/fd/2 | egrep '(ksh|libshell\.so\.[0-9])`[a-zA-Z_]' > /dev/null
 status=$? 
 
 kill $child
--- a/usr/src/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh	Mon Apr 25 12:59:44 2011 -0400
+++ b/usr/src/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh	Tue Apr 19 13:31:18 2011 -0400
@@ -23,7 +23,6 @@
 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 
 script()
 {
@@ -62,7 +61,7 @@
 #
 # The only thing we can be sure of here is that ksh is doing some work.
 #
-script | tee /dev/fd/2 | grep -w ksh > /dev/null
+script | tee /dev/fd/2 | egrep -w '(ksh|libshell)' > /dev/null
 status=$? 
 
 kill $child
--- a/usr/src/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh	Mon Apr 25 12:59:44 2011 -0400
+++ b/usr/src/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh	Tue Apr 19 13:31:18 2011 -0400
@@ -23,7 +23,6 @@
 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 
 script()
 {
@@ -63,7 +62,7 @@
 # This test is essentially the same as that in the ufunc test; see that
 # test for the rationale.
 #
-script | tee /dev/fd/2 | grep 'ksh`[a-zA-Z_]' > /dev/null
+script | tee /dev/fd/2 | egrep '(ksh|libshell\.so\.[0-9])`[a-zA-Z_]' > /dev/null
 status=$? 
 
 kill $child
--- a/usr/src/cmd/dtrace/test/tst/common/safety/tst.violentdeath.ksh	Mon Apr 25 12:59:44 2011 -0400
+++ b/usr/src/cmd/dtrace/test/tst/common/safety/tst.violentdeath.ksh	Tue Apr 19 13:31:18 2011 -0400
@@ -23,11 +23,10 @@
 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 
 script()
 {
-	$dtrace -x bufpolicy=ring -x bufsize=1k -s /dev/stdin <<EOF
+	exec $dtrace -x bufpolicy=ring -x bufsize=1k -s /dev/stdin <<EOF
 	fbt:::
 	{}
 EOF
--- a/usr/src/cmd/dtrace/test/tst/common/ustack/tst.spin.ksh	Mon Apr 25 12:59:44 2011 -0400
+++ b/usr/src/cmd/dtrace/test/tst/common/ustack/tst.spin.ksh	Tue Apr 19 13:31:18 2011 -0400
@@ -23,7 +23,6 @@
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 
 if [ $# != 1 ]; then
 	echo expected one argument: '<'dtrace-path'>'
@@ -35,7 +34,7 @@
 
 rm -f $file
 
-dir=`dirname $tst`
+dir=`/bin/dirname $tst`
 
 $dtrace -o $file -c $dir/tst.spin.exe -s /dev/stdin <<EOF
 
--- a/usr/src/lib/libreparse/common/fs_reparse_lib.c	Mon Apr 25 12:59:44 2011 -0400
+++ b/usr/src/lib/libreparse/common/fs_reparse_lib.c	Tue Apr 19 13:31:18 2011 -0400
@@ -64,22 +64,22 @@
  * return 0 if ok else return error code.
  */
 int
-reparse_create(const char *path, const char *string)
+reparse_create(const char *path, const char *data)
 {
 	int err;
 	struct stat sbuf;
 
-	if (path == NULL || string == NULL)
+	if (path == NULL || data == NULL)
 		return (EINVAL);
 
-	if ((err = reparse_validate(string)) != 0)
+	if ((err = reparse_validate(data)) != 0)
 		return (err);
 
 	/* check if object exists */
 	if (lstat(path, &sbuf) == 0)
 		return (EEXIST);
 
-	return (symlink(string, path) ? errno : 0);
+	return (symlink(data, path) ? errno : 0);
 }
 
 /*
--- a/usr/src/uts/common/fs/fs_reparse.h	Mon Apr 25 12:59:44 2011 -0400
+++ b/usr/src/uts/common/fs/fs_reparse.h	Tue Apr 19 13:31:18 2011 -0400
@@ -75,7 +75,7 @@
 			const char *svc_data);
 extern int reparse_remove(nvlist_t *nvl, const char *svc_type);
 extern int reparse_unparse(nvlist_t *nvl, char **stringp);
-extern int reparse_create(const char *path, const char *string);
+extern int reparse_create(const char *path, const char *data);
 extern int reparse_delete(const char *path);
 extern int reparse_deref(const char *svc_type, const char *svc_data,
 			char *buf, size_t *bufsz);