[ovs-dev] [PATCH] checkpatch: Normalize exit code for Windows
blp at ovn.org
Tue Feb 5 16:32:55 UTC 2019
On Tue, Feb 05, 2019 at 05:05:19PM +0200, Alin Gabriel Serdean wrote:
> Using python `sys.exit(-1)` on Windows produces mixed results.
> Let's take the following results from different shells:
> >python -c "import sys; sys.exit(-1)" & echo %errorlevel%
> $ python -c "import sys; sys.exit(-1)" && echo $?
> $ python -c "import sys; sys.exit(-1)"; echo $?
> this results in the following tests to fail:
> 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 <aserdean at ovn.org>
Curious! I did not know about this particular nonportable behavior.
Acked-by: Ben Pfaff <blp at ovn.org>
More information about the dev