[v2] devtools: fix error propagation from check-forbidden-tokens.awk

Message ID 1545146340-17973-1-git-send-email-arnon@qwilt.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] devtools: fix error propagation from check-forbidden-tokens.awk |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Arnon Warshavsky Dec. 18, 2018, 3:19 p.m. UTC
  Bugzilla ID: 165
Fixes: 4d4c612e6a30 ("devtools: check wrong svg include in guides")
Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>

Explicitly collect the error code of the
multiple awk script calls
---
 devtools/checkpatches.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
  

Comments

Thomas Monjalon Dec. 21, 2018, 12:59 a.m. UTC | #1
18/12/2018 16:19, Arnon Warshavsky:
> Bugzilla ID: 165
> Fixes: 4d4c612e6a30 ("devtools: check wrong svg include in guides")
> Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
> 
> Explicitly collect the error code of the
> multiple awk script calls

Applied, thanks

Note: the explanation must be moved at the beginning of the message.
  
David Marchand Jan. 17, 2019, 12:20 p.m. UTC | #2
On Fri, Dec 21, 2018 at 2:00 AM Thomas Monjalon <thomas@monjalon.net> wrote:

> 18/12/2018 16:19, Arnon Warshavsky:
> > Bugzilla ID: 165
>

Thomas,

I just noticed that the bz is still opened.
Who is supposed to close bug reports ?
  
Thomas Monjalon Jan. 17, 2019, 3:32 p.m. UTC | #3
17/01/2019 13:20, David Marchand:
> On Fri, Dec 21, 2018 at 2:00 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> 
> > 18/12/2018 16:19, Arnon Warshavsky:
> > > Bugzilla ID: 165
> >
> 
> Thomas,
> 
> I just noticed that the bz is still opened.
> Who is supposed to close bug reports ?

I think we never formally described this workflow.

I suggest to expect the bug reporter to close the bug.

Comments?
Should we update the website with this info?
  
David Marchand Jan. 17, 2019, 5:25 p.m. UTC | #4
On Thu, Jan 17, 2019 at 4:33 PM Thomas Monjalon <thomas@monjalon.net> wrote:

> 17/01/2019 13:20, David Marchand:
> > On Fri, Dec 21, 2018 at 2:00 AM Thomas Monjalon <thomas@monjalon.net>
> wrote:
> >
> > > 18/12/2018 16:19, Arnon Warshavsky:
> > > > Bugzilla ID: 165
> > >
> >
> > Thomas,
> >
> > I just noticed that the bz is still opened.
> > Who is supposed to close bug reports ?
>
> I think we never formally described this workflow.
>
> I suggest to expect the bug reporter to close the bug.
>

Well, the reporter is most likely able to reproduce an issue and confirm it
is fixed.
So +1 for me.
  
Ajit Khaparde Jan. 17, 2019, 9:34 p.m. UTC | #5
On Thu, Jan 17, 2019 at 9:26 AM David Marchand <david.marchand@redhat.com>
wrote:

> On Thu, Jan 17, 2019 at 4:33 PM Thomas Monjalon <thomas@monjalon.net>
> wrote:
>
>> 17/01/2019 13:20, David Marchand:
>> > On Fri, Dec 21, 2018 at 2:00 AM Thomas Monjalon <thomas@monjalon.net>
>> wrote:
>> >
>> > > 18/12/2018 16:19, Arnon Warshavsky:
>> > > > Bugzilla ID: 165
>> > >
>> >
>> > Thomas,
>> >
>> > I just noticed that the bz is still opened.
>> > Who is supposed to close bug reports ?
>>
>> I think we never formally described this workflow.
>>
>> I suggest to expect the bug reporter to close the bug.
>>
>
> Well, the reporter is most likely able to reproduce an issue and confirm
> it is fixed.
> So +1 for me.
>
Unless I miss an update, I generally try to assign the BZ back to the
reporter to get an agreement,
or confirmation as needed and get the BZ closed.
So +1 for me as well.

Thanks
Ajit

>
>
> --
> David Marchand
>
  
Thomas Monjalon Jan. 17, 2019, 9:47 p.m. UTC | #6
17/01/2019 22:34, Ajit Khaparde:
> On Thu, Jan 17, 2019 at 9:26 AM David Marchand <david.marchand@redhat.com>
> wrote:
> 
> > On Thu, Jan 17, 2019 at 4:33 PM Thomas Monjalon <thomas@monjalon.net>
> > wrote:
> >
> >> 17/01/2019 13:20, David Marchand:
> >> > On Fri, Dec 21, 2018 at 2:00 AM Thomas Monjalon <thomas@monjalon.net>
> >> wrote:
> >> >
> >> > > 18/12/2018 16:19, Arnon Warshavsky:
> >> > > > Bugzilla ID: 165
> >> > >
> >> >
> >> > Thomas,
> >> >
> >> > I just noticed that the bz is still opened.
> >> > Who is supposed to close bug reports ?
> >>
> >> I think we never formally described this workflow.
> >>
> >> I suggest to expect the bug reporter to close the bug.
> >>
> >
> > Well, the reporter is most likely able to reproduce an issue and confirm
> > it is fixed.
> > So +1 for me.
> >
> Unless I miss an update, I generally try to assign the BZ back to the
> reporter to get an agreement,
> or confirmation as needed and get the BZ closed.
> So +1 for me as well.

Interesting. Ajit, I think we never documented this process.
Would you like to describe it briefly here:
	http://core.dpdk.org/contribute/#bugzilla
  
Ajit Khaparde Jan. 18, 2019, 4:59 a.m. UTC | #7
On Thu, Jan 17, 2019 at 1:47 PM Thomas Monjalon <thomas@monjalon.net> wrote:

> 17/01/2019 22:34, Ajit Khaparde:
> > On Thu, Jan 17, 2019 at 9:26 AM David Marchand <
> david.marchand@redhat.com>
> > wrote:
> >
> > > On Thu, Jan 17, 2019 at 4:33 PM Thomas Monjalon <thomas@monjalon.net>
> > > wrote:
> > >
> > >> 17/01/2019 13:20, David Marchand:
> > >> > On Fri, Dec 21, 2018 at 2:00 AM Thomas Monjalon <
> thomas@monjalon.net>
> > >> wrote:
> > >> >
> > >> > > 18/12/2018 16:19, Arnon Warshavsky:
> > >> > > > Bugzilla ID: 165
> > >> > >
> > >> >
> > >> > Thomas,
> > >> >
> > >> > I just noticed that the bz is still opened.
> > >> > Who is supposed to close bug reports ?
> > >>
> > >> I think we never formally described this workflow.
> > >>
> > >> I suggest to expect the bug reporter to close the bug.
> > >>
> > >
> > > Well, the reporter is most likely able to reproduce an issue and
> confirm
> > > it is fixed.
> > > So +1 for me.
> > >
> > Unless I miss an update, I generally try to assign the BZ back to the
> > reporter to get an agreement,
> > or confirmation as needed and get the BZ closed.
> > So +1 for me as well.
>
> Interesting. Ajit, I think we never documented this process.
> Would you like to describe it briefly here:
>         http://core.dpdk.org/contribute/#bugzilla
>
> Sure. I am working on it. But I think we need to also mention that
bugs will also be aged out if there is no activity on it for say "1" year?
Unless there is a valid reason to keep it open?
  

Patch

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index ee8debe..3b03b7e 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -44,6 +44,8 @@  print_usage () {
 }
 
 check_forbidden_additions() { # <patch>
+	res=0
+
 	# refrain from new additions of rte_panic() and rte_exit()
 	# multiple folders and expressions are separated by spaces
 	awk -v FOLDERS="lib drivers" \
@@ -51,7 +53,8 @@  check_forbidden_additions() { # <patch>
 		-v RET_ON_FAIL=1 \
 		-v MESSAGE='Using rte_panic/rte_exit' \
 		-f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \
-		"$1"
+		"$1" || res=1
+
 	# svg figures must be included with wildcard extension
 	# because of png conversion for pdf docs
 	awk -v FOLDERS='doc' \
@@ -59,7 +62,9 @@  check_forbidden_additions() { # <patch>
 		-v RET_ON_FAIL=1 \
 		-v MESSAGE='Using explicit .svg extension instead of .*' \
 		-f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \
-		"$1"
+		"$1" || res = 1
+
+	return $res
 }
 
 number=0