public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: eugene.loh@oracle.com
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH] test: Remove args[3] from sdt:task::task_rename probe
Date: Sun, 21 Dec 2025 15:37:11 -0500	[thread overview]
Message-ID: <20251221203711.11353-1-eugene.loh@oracle.com> (raw)

From: Eugene Loh <eugene.loh@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@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


             reply	other threads:[~2025-12-21 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-21 20:37 eugene.loh [this message]
2026-01-16 16:32 ` [PATCH] test: Remove args[3] from sdt:task::task_rename probe Kris Van Hees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251221203711.11353-1-eugene.loh@oracle.com \
    --to=eugene.loh@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox