[DTrace-devel] [PATCH 08/12] Fix test/unittest/providers/tst.dtrace_cleanup.sh

eugene.loh at oracle.com eugene.loh at oracle.com
Sat Jul 11 17:38:32 PDT 2020


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

The test would launch DTrace with two probes, BEGIN and
END, and watch for "matched [1-9] probe" in its output
to detect completion of job launch.  The problem is that
we used "dtrace -n BEGIN -n END", which emits the messages:
    dtrace: description 'BEGIN' matched 1 probe
    dtrace: description 'END' matched 1 probe
That means it's possible for us to believe both probes had
been created when only one had.  The test would occasionally
fail.

Change the test to use "dtrace -n BEGIN,END".  That way, there
would be only one message:
    dtrace: description 'BEGIN,END' matched 2 probes
and detection of the message would be a better indicator.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>
---
 test/unittest/providers/tst.dtrace_cleanup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/unittest/providers/tst.dtrace_cleanup.sh b/test/unittest/providers/tst.dtrace_cleanup.sh
index 47348f22..a2bb22dc 100755
--- a/test/unittest/providers/tst.dtrace_cleanup.sh
+++ b/test/unittest/providers/tst.dtrace_cleanup.sh
@@ -17,7 +17,7 @@ dtrace=$1
 UPROBE_EVENTS=/sys/kernel/debug/tracing/uprobe_events
 
 out=/tmp/output.$$
-$dtrace $dt_flags -n BEGIN -n END &>> $out &
+$dtrace $dt_flags -n BEGIN,END &>> $out &
 pid=$!
 
 tail -F $out | awk '/matched [1-9] probe/ { exit; }'
-- 
2.18.2




More information about the DTrace-devel mailing list