[DTrace-devel] [PATCH 6/8] test: Check dtrace return status
eugene.loh at oracle.com
eugene.loh at oracle.com
Tue Jun 4 18:00:06 UTC 2024
From: Eugene Loh <eugene.loh at oracle.com>
This test was spuriously passing. DTrace failed to run -- many error
messages in the log file indicated as much -- and yet the test passed.
Check the dtrace return status. Due to recent USDT changes, the test
now passes (properly).
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
test/unittest/usdt/tst.forker.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/unittest/usdt/tst.forker.sh b/test/unittest/usdt/tst.forker.sh
index 018a6572..92513eb5 100755
--- a/test/unittest/usdt/tst.forker.sh
+++ b/test/unittest/usdt/tst.forker.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Oracle Linux DTrace.
-# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 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.
#
@@ -32,6 +32,10 @@ while kill -0 $id >/dev/null 2>&1; do
exit(0);
}
EOF
+ if [ $? -ne 0 ]; then
+ echo ERROR: DTrace failed to run
+ exit 1
+ fi
done
exit 0
--
2.18.4
More information about the DTrace-devel
mailing list