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 2/3] test: Convert tick-* probes to ioctl:entry for tst.trunc[quant].d
Date: Thu,  1 May 2025 14:22:51 -0400	[thread overview]
Message-ID: <20250501182252.27772-2-eugene.loh@oracle.com> (raw)
In-Reply-To: <20250501182252.27772-1-eugene.loh@oracle.com>

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


  reply	other threads:[~2025-05-01 18:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-01 18:22 [PATCH 1/3] Cache per-CPU agg map IDs eugene.loh
2025-05-01 18:22 ` eugene.loh [this message]
2025-07-16 13:21   ` [PATCH 2/3] test: Convert tick-* probes to ioctl:entry for tst.trunc[quant].d Nick Alcock
2025-05-01 18:22 ` [PATCH 3/3] test: Mimic dtrace arithmetic more closely for avg/stddev eugene.loh
2025-07-16 13:22   ` [DTrace-devel] " Nick Alcock
2025-07-16 19:51     ` Eugene Loh
2025-07-16 13:20 ` [DTrace-devel] [PATCH 1/3] Cache per-CPU agg map IDs Nick Alcock
2025-07-16 18:42   ` Eugene Loh
2025-07-16 19:10 ` Kris Van Hees
2025-07-16 20:05   ` Eugene Loh

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=20250501182252.27772-2-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