test: Remove args[3] from sdt:task::task_rename probe
PATCH 1/1 test: Remove args[3] from sdt:task::task_rename probe
From: Eugene Loh <[email protected]>
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.
--- test/unittest/disasm/tst.ann-bvar.r | 1 - test/unittest/disasm/tst.ann-bvar.sh | 14 +++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-)
test/unittest/disasm/tst.ann-bvar.r +0 -1
@@ -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
test/unittest/disasm/tst.ann-bvar.sh +11 -3
@@ -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 $?
Signature · 1 line
2.47.3
Quoted 8 lines · On Sun, Dec 21, 2025 at 03:37:11PM -0500, [email protected] wrote:
From: Eugene Loh <[email protected]>
Commit
e3f6a4227("tracing: Remove pid intask_renametracing output") of the Linux kernel (6.14-rc1) removed the pid (first) argument to thetask_renametracepoint. The corresponding DTrace sdt probe, therefore, has one less argument. Change the test to omit args[3], regardless of the kernel version.
Quoted 8 lines
Change the test to emit more diagnostic output in case of failure.
Commit
564efa04c("test: adjust sdt.tst.args.d fortask_renametracepoint differences") of DTrace already handles thistask_renameissue 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 <[email protected]>
Quoted 63 lines
--- test/unittest/disasm/tst.ann-bvar.r | 1 - test/unittest/disasm/tst.ann-bvar.sh | 14 +++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-)test/unittest/disasm/tst.ann-bvar.r +0
-1@@ -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 ! curthreadtest/unittest/disasm/tst.ann-bvar.sh +11
-3@@ -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 $?Signature · 1 line
2.47.3