[DTrace-devel] [PATCH] test: Remove args[3] from sdt:task::task_rename probe

eugene.loh at oracle.com eugene.loh at oracle.com
Sun Dec 21 20:37:11 UTC 2025


From: Eugene Loh <eugene.loh at oracle.com>

Commit e3f6a4227 ("tracing: Remove pid in task_rename tracing output")
of the Linux kernel (6.14-rc1) removed the pid (first) argument to the
task_rename tracepoint.  The corresponding DTrace sdt probe, therefore,
has one less argument.  Change the test to omit args[3], regardless of
the kernel version.

Change the test to emit more diagnostic output in case of failure.

Commit 564efa04c ("test: adjust sdt.tst.args.d for task_rename
tracepoint differences") of DTrace already handles this task_rename
issue for test/unittest/sdt/tst.args-*.d by simply skipping one test
or the other depending on whether the kernel version is < or >= 6.14.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 test/unittest/disasm/tst.ann-bvar.r  |  1 -
 test/unittest/disasm/tst.ann-bvar.sh | 14 +++++++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/test/unittest/disasm/tst.ann-bvar.r b/test/unittest/disasm/tst.ann-bvar.r
index a55fb6deb..9ec0d8187 100644
--- a/test/unittest/disasm/tst.ann-bvar.r
+++ b/test/unittest/disasm/tst.ann-bvar.r
@@ -11,7 +11,6 @@
 85 0 1 0000 ffffffff    call dt_bvar_args             ! args[0]
 85 0 1 0000 ffffffff    call dt_bvar_args             ! args[1]
 85 0 1 0000 ffffffff    call dt_bvar_args             ! args[2]
-85 0 1 0000 ffffffff    call dt_bvar_args             ! args[3]
 85 0 1 0000 ffffffff    call dt_bvar_caller           ! caller
 85 0 1 0000 ffffffff    call dt_bvar_curcpu           ! curcpu
 85 0 1 0000 ffffffff    call dt_bvar_curthread        ! curthread
diff --git a/test/unittest/disasm/tst.ann-bvar.sh b/test/unittest/disasm/tst.ann-bvar.sh
index 61e838d10..d7caeecfb 100755
--- a/test/unittest/disasm/tst.ann-bvar.sh
+++ b/test/unittest/disasm/tst.ann-bvar.sh
@@ -1,12 +1,13 @@
 #!/bin/bash
 #
 # Oracle Linux DTrace.
-# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2022, 2026, Oracle and/or its affiliates. All rights reserved.
 # Licensed under the Universal Permissive License v 1.0 as shown at
 # http://oss.oracle.com/licenses/upl.
 #
 
 dtrace=$1
+tmpfile=$tmpdir/tst.ann_bvar.$$
 
 $dtrace $dt_flags -Sen '
 sdt:task::task_rename
@@ -24,7 +25,7 @@ sdt:task::task_rename
 	trace(args[0]);
 	trace(args[1]);
 	trace(args[2]);
-	trace(args[3]);
+/*	trace(args[3]); */
 	trace(caller);
 	trace(curcpu);
 	trace(curthread);
@@ -50,6 +51,13 @@ sdt:task::task_rename
 	trace(walltimestamp);
 	exit(0);
 }
-' 2>&1 | gawk '/ call dt_bvar_/ { sub(/^[^:]+: /, ""); print; }'
+' >& $tmpfile
+if [ $? -ne 0 ]; then
+	echo "ERROR: DTrace not successful"
+	cat $tmpfile
+	exit 1
+fi
+
+gawk '/ call dt_bvar_/ { sub(/^[^:]+: /, ""); print; }' $tmpfile
 
 exit $?
-- 
2.47.3




More information about the DTrace-devel mailing list