> De la: ovs-dev-boun...@openvswitch.org <ovs-dev-
> boun...@openvswitch.org> În numele Aaron Conole
> Trimis: Tuesday, February 5, 2019 10:39 PM
> Către: Alin Gabriel Serdean <aserd...@ovn.org>
> Cc: d...@openvswitch.org
> Subiect: Re: [ovs-dev] [PATCH] checkpatch: Normalize exit code for Windows
> 
> Alin Gabriel Serdean <aserd...@ovn.org> writes:
> 
> > Using python `sys.exit(-1)` on Windows produces mixed results.
> > Let's take the following results from different shells:
> > CMD
> >>python -c "import sys; sys.exit(-1)" & echo %errorlevel%
> > 1
> > MSYS
> > $ python -c "import sys; sys.exit(-1)" && echo $?
> > 0
> > WSL
> > $ python -c "import sys; sys.exit(-1)"; echo $?
> > 255
> >
> > this results in the following tests to fail:
> > checkpatch
> >
> >  10: checkpatch - sign-offs                          FAILED
(checkpatch.at:32)
> >  11: checkpatch - parenthesized constructs           FAILED
(checkpatch.at:32)
> >  12: checkpatch - parenthesized constructs - for     FAILED
> (checkpatch.at:32)
> >  13: checkpatch - comments                           FAILED
(checkpatch.at:32)
> >
> > because of:
> >  ./checkpatch.at:32: exit code was 0, expected 255
> >
> > This patch introduces a positive constant for the default exit code.
> >
> > Signed-off-by: Alin Gabriel Serdean <aserd...@ovn.org>
> > ---
> 
> Acked-by: Aaron Conole <acon...@redhat.com>
> 
> With one little fixup:
> 
> 1. either we should eliminate the result argument to
>    ovs_checkpatch_print_result
> 
> 2. or the test for the result < 0 needs to change to if result:
> 
> Otherwise, when an error is introduced, the exit code will be propagated,
> but the printout will be confusing:
> 
>   03:30:50 aconole {(0a8c1ec04...)} ~/git/ovs$ git commit -m "dpdk: This
is a
> test
>   Just testing
>   "
>   ERROR: C99 style comment
>   #10 FILE: lib/dpdk.c:17:
>   // BREAK!!
> 
> Lines checked: 15, no obvious problems found
> 
> :-)
> 
[Alin Serdean] Thanks for the feedback. I sent an incremental:
https://patchwork.ozlabs.org/patch/1039912/ . Do you mind taking another
look?

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to