[DTrace-devel] [PATCH 2/3] test: Convert tick-* probes to ioctl:entry for tst.trunc[quant].d

eugene.loh at oracle.com eugene.loh at oracle.com
Thu May 1 18:22:51 UTC 2025


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

Historically, many tests have used tick-* probes to get multiple
probe firings, but those probes can be unreliable, depending on
how a kernel is configured.  Tests that required very many probe
firings have been converted to ioctl:entry.  Tests that required
very few have been left alone.

Convert more of these tests.  They normally pass, but with erratic
execution time and sometimes time out.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 test/unittest/aggs/tst.trunc.d      | 12 +++++++-----
 test/unittest/aggs/tst.truncquant.d | 12 +++++++-----
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/test/unittest/aggs/tst.trunc.d b/test/unittest/aggs/tst.trunc.d
index dbaeb09a8..044afb3a6 100644
--- a/test/unittest/aggs/tst.trunc.d
+++ b/test/unittest/aggs/tst.trunc.d
@@ -1,23 +1,25 @@
 /*
  * Oracle Linux DTrace.
- * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2025, 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.
  */
+/* @@trigger: bogus-ioctl */
+/* @@nosort */
 
 #pragma D option quiet
 
 int i;
 
-tick-10ms
-/i < 100/
+syscall::ioctl:entry
+/pid == $target/
 {
 	@[i] = sum(i);
 	i++;
 }
 
-tick-10ms
-/i == 100/
+syscall::ioctl:entry
+/pid == $target && i == 100/
 {
 	exit(0);
 }
diff --git a/test/unittest/aggs/tst.truncquant.d b/test/unittest/aggs/tst.truncquant.d
index 9a8b707e5..9b9794e40 100644
--- a/test/unittest/aggs/tst.truncquant.d
+++ b/test/unittest/aggs/tst.truncquant.d
@@ -1,16 +1,18 @@
 /*
  * Oracle Linux DTrace.
- * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2025, 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.
  */
+/* @@trigger: bogus-ioctl */
+/* @@nosort */
 
 #pragma D option quiet
 
 int i;
 
-tick-10ms
-/i < 100/
+syscall::ioctl:entry
+/pid == $target/
 {
 	@[i] = lquantize(i, 0, 150);
 	@[i] = lquantize(i + 1, 0, 150);
@@ -19,8 +21,8 @@ tick-10ms
 	i++;
 }
 
-tick-10ms
-/i == 100/
+syscall::ioctl:entry
+/pid == $target && i == 100/
 {
 	exit(0);
 }
-- 
2.43.5




More information about the DTrace-devel mailing list