[DTrace-devel] [PATCH 1/5] test: Use a more ubiquitous probe for return()-action tests

eugene.loh at oracle.com eugene.loh at oracle.com
Wed Oct 1 06:24:14 UTC 2025


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

In commit ee2bd3465
("test: Use a more ubiquitous probe for return()-action tests"),
rawfbt probes are named in some tests, but they do not exist for
some kernels.  Switch to more ubiquitous probes, since the details
of the probe largely do not matter.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 test/unittest/actions/return/err.not_allowed-1.d   | 2 +-
 test/unittest/actions/return/err.not_allowed-1.r   | 2 +-
 test/unittest/actions/return/err.not_allowed-1.r.p | 5 +++++
 test/unittest/actions/return/err.not_allowed-2.d   | 2 +-
 test/unittest/actions/return/err.not_allowed-2.r   | 2 +-
 test/unittest/actions/return/err.not_allowed-3.d   | 2 +-
 test/unittest/actions/return/err.not_allowed-3.r   | 2 +-
 7 files changed, 11 insertions(+), 6 deletions(-)
 create mode 100755 test/unittest/actions/return/err.not_allowed-1.r.p

diff --git a/test/unittest/actions/return/err.not_allowed-1.d b/test/unittest/actions/return/err.not_allowed-1.d
index 246a68b18..e32751bf2 100644
--- a/test/unittest/actions/return/err.not_allowed-1.d
+++ b/test/unittest/actions/return/err.not_allowed-1.d
@@ -20,7 +20,7 @@ BEGIN
 	exit(0);
 }
 
-fbt:btrfs:open_ctree:entry
+fbt:vmlinux:__*_sys_getpid:entry
 /ok/
 {
 	return(0);
diff --git a/test/unittest/actions/return/err.not_allowed-1.r b/test/unittest/actions/return/err.not_allowed-1.r
index e3443c301..becd3d4fa 100644
--- a/test/unittest/actions/return/err.not_allowed-1.r
+++ b/test/unittest/actions/return/err.not_allowed-1.r
@@ -1,2 +1,2 @@
 -- @@stderr --
-dtrace: could not enable tracing: return() not allowed for fbt:btrfs:open_ctree:entry
+dtrace: could not enable tracing: return() not allowed for fbt:vmlinux:__*_sys_getpid:entry
diff --git a/test/unittest/actions/return/err.not_allowed-1.r.p b/test/unittest/actions/return/err.not_allowed-1.r.p
new file mode 100755
index 000000000..d356eb0dd
--- /dev/null
+++ b/test/unittest/actions/return/err.not_allowed-1.r.p
@@ -0,0 +1,5 @@
+#!/usr/bin/gawk -f
+{
+        sub("__.*_sys_getpid", "__*_sys_getpid");
+        print;
+}
diff --git a/test/unittest/actions/return/err.not_allowed-2.d b/test/unittest/actions/return/err.not_allowed-2.d
index e0d303c71..4c613065f 100644
--- a/test/unittest/actions/return/err.not_allowed-2.d
+++ b/test/unittest/actions/return/err.not_allowed-2.d
@@ -20,7 +20,7 @@ BEGIN
 	exit(0);
 }
 
-rawfbt:btrfs:close_ctree:entry
+rawfbt:vmlinux:abort:entry
 /ok/
 {
 	return(0);
diff --git a/test/unittest/actions/return/err.not_allowed-2.r b/test/unittest/actions/return/err.not_allowed-2.r
index 758d34770..bd47e2bae 100644
--- a/test/unittest/actions/return/err.not_allowed-2.r
+++ b/test/unittest/actions/return/err.not_allowed-2.r
@@ -1,2 +1,2 @@
 -- @@stderr --
-dtrace: could not enable tracing: return() not allowed for rawfbt:btrfs:close_ctree:entry
+dtrace: could not enable tracing: return() not allowed for rawfbt:vmlinux:abort:entry
diff --git a/test/unittest/actions/return/err.not_allowed-3.d b/test/unittest/actions/return/err.not_allowed-3.d
index 770565c93..87891b7ba 100644
--- a/test/unittest/actions/return/err.not_allowed-3.d
+++ b/test/unittest/actions/return/err.not_allowed-3.d
@@ -20,7 +20,7 @@ BEGIN
 	exit(0);
 }
 
-rawfbt:btrfs:*_ctree:entry
+rawfbt:vmlinux:abo*rt:entry
 /ok/
 {
 	return(0);
diff --git a/test/unittest/actions/return/err.not_allowed-3.r b/test/unittest/actions/return/err.not_allowed-3.r
index 758d34770..bd47e2bae 100644
--- a/test/unittest/actions/return/err.not_allowed-3.r
+++ b/test/unittest/actions/return/err.not_allowed-3.r
@@ -1,2 +1,2 @@
 -- @@stderr --
-dtrace: could not enable tracing: return() not allowed for rawfbt:btrfs:close_ctree:entry
+dtrace: could not enable tracing: return() not allowed for rawfbt:vmlinux:abort:entry
-- 
2.47.3




More information about the DTrace-devel mailing list