Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Bronnikov <sergeyb@tarantool.org>
Cc: Alexander Turenko <alexander.turenko@tarantool.org>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] tools: implement toolchain for crash artefacts
Date: Tue, 20 Apr 2021 00:06:02 +0300	[thread overview]
Message-ID: <20210419210602.GF29703@tarantool.org> (raw)
In-Reply-To: <ed11c84b-db09-28ae-2a79-e4cdce543a9d@tarantool.org>

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@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

  parent reply	other threads:[~2021-04-19 21:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 13:23 Igor Munkin via Tarantool-patches
2021-03-03 12:44 ` Sergey Bronnikov via Tarantool-patches
2021-03-08  4:56   ` Alexander Turenko via Tarantool-patches
2021-03-08 11:54     ` Sergey Bronnikov via Tarantool-patches
2021-03-11 12:13   ` Igor Munkin via Tarantool-patches
2021-03-24 16:02     ` Sergey Bronnikov via Tarantool-patches
2021-03-24 20:25       ` Alexander Turenko via Tarantool-patches
2021-03-25  9:45         ` Sergey Bronnikov via Tarantool-patches
2021-04-19 21:06       ` Igor Munkin via Tarantool-patches [this message]
2021-03-15 16:30 ` Alexander Turenko via Tarantool-patches
2021-04-19 20:42   ` Igor Munkin via Tarantool-patches
2021-04-19 23:57     ` Alexander Turenko via Tarantool-patches
2021-04-20 12:14       ` Igor Munkin via Tarantool-patches
2021-04-19 22:51 ` Igor Munkin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210419210602.GF29703@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=imun@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] tools: implement toolchain for crash artefacts' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox