[DTrace-devel] [PATCH v2 2/4] runtest: detect coredumps in more cases
Eugene Loh
eugene.loh at oracle.com
Fri Nov 15 04:47:48 UTC 2024
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
though how about for the commit message (just guessing here) something like:
Exitcode 139 == 128 + SIGSEGV should be reported as a coredump,
even if we can't find a core file anywhere.
On 11/14/24 17:01, Nick Alcock wrote:
> 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
More information about the DTrace-devel
mailing list