[DTrace-devel] [PATCH v2 2/4] runtest: detect coredumps in more cases

Nick Alcock nick.alcock at oracle.com
Thu Nov 14 22:01:06 UTC 2024


Exitcode 139 == signal 11 == a coredump that should be reported as such,
even if we can't find a core file anywhere.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
---
 runtest.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runtest.sh b/runtest.sh
index 46b532d7e161f..94634f80c2ebf 100755
--- a/runtest.sh
+++ b/runtest.sh
@@ -1361,9 +1361,9 @@ for dt in $dtrace; do
                 want_all_output=t
             fi
 
-            if [[ -f core ]] || [[ "$(find $tmpdir -name core -print)" != "" ]]; then
+            if [[ -f core ]] || [[ "$(find $tmpdir -name core -print)" != "" ]] || [[ $exitcode = 139 ]]; then
                 # A coredump in the current directory or under the tmpdir.
-                # Preserve it in the logdir.
+                # Preserve it in the logdir, if possible.
 
                 mv core $logdir/$(echo $base | tr '/' '-').core 2>/dev/null || true
                 find $tmpdir -name core -type f -print0 | xargs -0r -I'{}' mv --backup=numbered '{}' $logdir/$(echo $base | tr '/' '-').core
-- 
2.46.0.278.g36e3a12567




More information about the DTrace-devel mailing list