[DTrace-devel] [PATCH] Allow for changing number of syscalls

eugene.loh at oracle.com eugene.loh at oracle.com
Mon Dec 7 14:13:25 PST 2020


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

DTrace reports how many probes were matched.  Since the number of
syscalls can depend on the kernel, the number of matched syscalls
expected should not be hardcoded in our test result files.  This
problem seems to impact only test/unittest/syscall/tst.entry.d .

Add a .r.p post-processing file to mask out the exact number of
matched probes for this test.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 test/unittest/syscall/tst.entry.r   | 2 +-
 test/unittest/syscall/tst.entry.r.p | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100755 test/unittest/syscall/tst.entry.r.p

diff --git a/test/unittest/syscall/tst.entry.r b/test/unittest/syscall/tst.entry.r
index 8066c23f..52510e61 100644
--- a/test/unittest/syscall/tst.entry.r
+++ b/test/unittest/syscall/tst.entry.r
@@ -2,4 +2,4 @@
                       mmap:entry 
 
 -- @@stderr --
-dtrace: script 'test/unittest/syscall/tst.entry.d' matched 333 probes
+dtrace: script 'test/unittest/syscall/tst.entry.d' matched NNN probes
diff --git a/test/unittest/syscall/tst.entry.r.p b/test/unittest/syscall/tst.entry.r.p
new file mode 100755
index 00000000..74bf4560
--- /dev/null
+++ b/test/unittest/syscall/tst.entry.r.p
@@ -0,0 +1,8 @@
+#!/usr/bin/gawk -f
+# Oracle Linux DTrace.
+# Copyright (c) 2020, 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: script .* matched [0-9]* probes/ { $(NF-1) = "NNN" }
+{print}
-- 
2.18.4




More information about the DTrace-devel mailing list