[DTrace-devel] [PATCH] test: Wait for output to flush out in enable_pid
eugene.loh at oracle.com
eugene.loh at oracle.com
Sun Jun 8 05:36:20 UTC 2025
From: Eugene Loh <eugene.loh at oracle.com>
Our luck with this test has been quite good, but it sometimes fails
to show its last lines of output. That is, we send a USR1 to the
trigger processes to set off the final output and we immediately
cat the output files. If there is any delay, the last output will
be missing.
Add a short delay so that the last output will be seen.
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
test/unittest/usdt/tst.enable_pid.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/unittest/usdt/tst.enable_pid.sh b/test/unittest/usdt/tst.enable_pid.sh
index 7f4f68698..5a151c767 100755
--- a/test/unittest/usdt/tst.enable_pid.sh
+++ b/test/unittest/usdt/tst.enable_pid.sh
@@ -172,6 +172,9 @@ for pid in 1 $pid1 $pid2 '*'; do
kill -USR1 $pid2
done
+# wait for last of the output to flush out
+sleep 2
+
echo done
echo "========== out 1"; cat out.1
echo "========== out 2"; cat out.2
--
2.43.5
More information about the DTrace-devel
mailing list