[Tarantool-patches] [PATCH] tools: implement toolchain for crash artefacts
Igor Munkin
imun at tarantool.org
Tue Apr 20 00:06:02 MSK 2021
Sergey,
Thanks for your review!
On 24.03.21, Sergey Bronnikov wrote:
> Igor,
>
> thanks for changes! Generally LGTM with two notes inline.
Added your tag:
| Reviewed-by: Sergey Bronnikov <sergeyb at tarantool.org>
>
> On 11.03.2021 15:13, Igor Munkin wrote:
> > Sergey,
> >
> > Thanks for your review!
> >
> > On 03.03.21, Sergey Bronnikov wrote:
> <skipped>
> >> 2. I propose to show files included to the report and the end of creation.
> > Well, I believe I didn't understand you right before (this list is
> > included to the archive). Anyway, now I added the list also to the
> > message at the end.
>
> You got it right.
>
> <skipped>
>
>
> 1. in a private conversation we decided to remove mention of public
> resource in a message "http://transfer.sh".
Removed. Diff is below:
================================================================================
diff --git a/tools/tarabrt.sh b/tools/tarabrt.sh
index e09d051a4..b484fc9fb 100755
--- a/tools/tarabrt.sh
+++ b/tools/tarabrt.sh
@@ -289,7 +289,7 @@ The archive contents are listed below:
$(cat "${TARLIST}")
If you want to upload it, choose the available resource
-(e.g. http://transfer.sh) and run the following command:
+and run the following command:
$ curl -T ${ARCHIVE} <resource-uri>
FINALIZE
================================================================================
>
>
> > - Manual usage. User can simply pack all necessary artefacts by
> running the
> > following command.
> > $ /path/to/${TOOL} -c ./core -d /tmp
> >
> > - Automatic usage. If user faces the failures often, one can set
> this script
> > as a pipe reciever in kernel.core_pattern syntax.
> > # sysctl -w kernel.core_pattern="|/absolute/path/to/${TOOL} -d
> /var/core -p %p -t %t"
>
> 2. it would be more convenient to set real path to tarabrt.sh in a
> usage, see patch below
I'll follow Sasha's suggestion and simply use the given script name.
Diff is below:
================================================================================
diff --git a/tools/tarabrt.sh b/tools/tarabrt.sh
index b484fc9fb..66d6a39d6 100755
--- a/tools/tarabrt.sh
+++ b/tools/tarabrt.sh
@@ -3,7 +3,7 @@ set -eu
TOOL=$(basename "$0")
HELP=$(cat <<HELP
-${TOOL} - Tarantool Automatic Bug Reporting Tool
+$0 - Tarantool Automatic Bug Reporting Tool
This tool collects all required artefacts (listed below) and packs them into
a single archive with unified format:
@@ -16,7 +16,7 @@ a single archive with unified format:
SYNOPSIS
- ${TOOL} [-h] [-c core] [-d dir] [-e executable] [-p procID] [-t datetime]
+ $0 [-h] [-c core] [-d dir] [-e executable] [-p procID] [-t datetime]
Supported options are:
-c COREDUMP Use file COREDUMP as a core dump to examine.
@@ -46,11 +46,11 @@ USAGE
- Manual usage. User can simply pack all necessary artefacts by running the
following command.
- $ /path/to/${TOOL} -c ./core -d /tmp
+ $ $0 -c ./core -d /tmp
- Automatic usage. If user faces the failures often, one can set this script
as a pipe reciever in kernel.core_pattern syntax.
- # sysctl -w kernel.core_pattern="|/absolute/path/to/${TOOL} -d /var/core -p %p -t %t"
+ # sysctl -w kernel.core_pattern="|$0 -d /var/core -p %p -t %t"
HELP
)
================================================================================
>
> --- a/tools/tarabrt.sh
> +++ b/tools/tarabrt.sh
> @@ -2,6 +2,8 @@
> set -eu
>
> TOOL=$(basename "$0")
> +#TOOLPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
> +TOOLPATH=$(realpath -s $0)
> HELP=$(cat <<HELP
> ${TOOL} - Tarantool Automatic Bug Reporting Tool
>
> @@ -45,11 +47,11 @@ USAGE
>
> - Manual usage. User can simply pack all necessary artefacts by
> running the
> following command.
> - $ /path/to/${TOOL} -c ./core -d /tmp
> + $ ${TOOLPATH} -c ./core -d /tmp
>
> - Automatic usage. If user faces the failures often, one can set
> this script
> as a pipe reciever in kernel.core_pattern syntax.
> - # sysctl -w kernel.core_pattern="|/absolute/path/to/${TOOL} -d
> /var/core -p %p -t %t"
> + # sysctl -w kernel.core_pattern="|${TOOLPATH} -d /var/core -p %p -t %t"
>
> HELP
> )
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list