forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checkpatch: Normalize exit code for Windows
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 (1) similar to other OVS utilities. Signed-off-by: Alin Gabriel Serdean <[email protected]> Acked-by: Ben Pfaff <[email protected]> Acked-by: Aaron Conole <[email protected]>
- Loading branch information
Showing
2 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters