[DTrace-devel] [PATCH] test: Clean up -F test

eugene.loh at oracle.com eugene.loh at oracle.com
Tue Mar 12 18:18:55 UTC 2024


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

Commit e3c8b283b7d8 ("test: Clean up flowindent test") updated the
flowindent test.  Make corresponding changes in the -F test.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 test/unittest/options/tst.F.aarch64.r |  1 +
 test/unittest/options/tst.F.d         | 22 +++-----------
 test/unittest/options/tst.F.r         | 44 ---------------------------
 test/unittest/options/tst.F.r.p       |  1 +
 test/unittest/options/tst.F.x86_64.r  |  1 +
 5 files changed, 7 insertions(+), 62 deletions(-)
 create mode 120000 test/unittest/options/tst.F.aarch64.r
 delete mode 100644 test/unittest/options/tst.F.r
 create mode 120000 test/unittest/options/tst.F.r.p
 create mode 120000 test/unittest/options/tst.F.x86_64.r

diff --git a/test/unittest/options/tst.F.aarch64.r b/test/unittest/options/tst.F.aarch64.r
new file mode 120000
index 00000000..802f9b82
--- /dev/null
+++ b/test/unittest/options/tst.F.aarch64.r
@@ -0,0 +1 @@
+tst.flowindent.aarch64.r
\ No newline at end of file
diff --git a/test/unittest/options/tst.F.d b/test/unittest/options/tst.F.d
index 34c0c475..90430868 100644
--- a/test/unittest/options/tst.F.d
+++ b/test/unittest/options/tst.F.d
@@ -1,10 +1,9 @@
 /*
  * Oracle Linux DTrace.
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, 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.
  */
-/* @@xfail: flowindent is broken */
 
 /*
  * ASSERTION: The -F option enables entry/return matching output.
@@ -12,7 +11,7 @@
  * SECTION: Options and Tunables/Consumer Options
  */
 
-/* @@runtest-opts: -FZ */
+/* @@runtest-opts: -FZ -xswitchrate=1s */
 /* @@timeout: 15 */
 /* @@trigger: readwholedir */
 
@@ -20,11 +19,10 @@ BEGIN
 {
 	i = 0;
 	j = 0;
-	k = 0;
 }
 
 syscall::read:
-/i < 10/
+/pid == $target/
 {
 	printf("syscall: %d\n", i++);
 }
@@ -32,19 +30,7 @@ syscall::read:
 fbt:vmlinux:SyS_read:,
 fbt:vmlinux:__arm64_sys_read:,
 fbt:vmlinux:__x64_sys_read:
-/j < 10/
+/pid == $target/
 {
 	printf("fbt: %d\n", j++);
 }
-
-profile:::tick-1sec
-/k < 4/
-{
-	printf("profile: %d\n", k++);
-}
-
-profile:::tick-10sec
-/i > 9 && j > 9 && k > 3/
-{
-	exit(0);
-}
diff --git a/test/unittest/options/tst.F.r b/test/unittest/options/tst.F.r
deleted file mode 100644
index aae92b2e..00000000
--- a/test/unittest/options/tst.F.r
+++ /dev/null
@@ -1,44 +0,0 @@
-FUNCTION                                 
- => read                                  syscall: 0
-
-   -> __x64_sys_read                      fbt: 0
-
-   <- __x64_sys_read                      fbt: 1
-
- <= read                                  syscall: 1
-
- => read                                  syscall: 2
-
-   -> __x64_sys_read                      fbt: 2
-
-   <- __x64_sys_read                      fbt: 3
-
- <= read                                  syscall: 3
-
- => read                                  syscall: 4
-
-   -> __x64_sys_read                      fbt: 4
-
-   <- __x64_sys_read                      fbt: 5
-
- <= read                                  syscall: 5
-
- => read                                  syscall: 6
-
-   -> __x64_sys_read                      fbt: 6
-
-   <- __x64_sys_read                      fbt: 7
-
- <= read                                  syscall: 7
-
- => read                                  syscall: 8
-
-   -> __x64_sys_read                      fbt: 8
-
-   <- __x64_sys_read                      fbt: 9
-
- <= read                                  syscall: 9
-
-
--- @@stderr --
-dtrace: script 'test/unittest/options/tst.flowindent.d' matched 7 probes
diff --git a/test/unittest/options/tst.F.r.p b/test/unittest/options/tst.F.r.p
new file mode 120000
index 00000000..6260a34c
--- /dev/null
+++ b/test/unittest/options/tst.F.r.p
@@ -0,0 +1 @@
+tst.flowindent.r.p
\ No newline at end of file
diff --git a/test/unittest/options/tst.F.x86_64.r b/test/unittest/options/tst.F.x86_64.r
new file mode 120000
index 00000000..509d38a6
--- /dev/null
+++ b/test/unittest/options/tst.F.x86_64.r
@@ -0,0 +1 @@
+tst.flowindent.x86_64.r
\ No newline at end of file
-- 
2.18.4




More information about the DTrace-devel mailing list