Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cmd_execute with negative exit code #1488

Merged

Conversation

WangWeiLin-MV
Copy link
Contributor

@WangWeiLin-MV WangWeiLin-MV commented Sep 11, 2024

Add test program closes-exit-int-min.c to return exit code with negative value -1, expected -1 for windows, expected 255 for unix.

Failed as expected before #1489

src/closes-exit-int-min.c Outdated Show resolved Hide resolved
@WangWeiLin-MV
Copy link
Contributor Author

Duplicate of 1489

@WangWeiLin-MV WangWeiLin-MV deleted the base-system-process/uint-exit-code branch September 12, 2024 02:07
@BillyONeal
Copy link
Member

I think your test idea is good; if you want to fix it to do TerminateProcess(GetCurrentProcess(), 0xC0000000); instead of trying to return from main that would be much appreciated. But no need to do that if you don't want.

@WangWeiLin-MV WangWeiLin-MV changed the title Keep DWORD exit code on Windows cmd_execute Test cmd_execute with negative exit code Sep 18, 2024
@WangWeiLin-MV WangWeiLin-MV restored the base-system-process/uint-exit-code branch September 18, 2024 08:00
@WangWeiLin-MV WangWeiLin-MV reopened this Sep 18, 2024
@WangWeiLin-MV WangWeiLin-MV force-pushed the base-system-process/uint-exit-code branch 8 times, most recently from 8a548fa to 49fb8c0 Compare September 18, 2024 10:37
@BillyONeal
Copy link
Member

Thanks so much for the test! <3

@WangWeiLin-MV WangWeiLin-MV force-pushed the base-system-process/uint-exit-code branch from 49fb8c0 to 7fb0a31 Compare September 19, 2024 03:52
@WangWeiLin-MV WangWeiLin-MV force-pushed the base-system-process/uint-exit-code branch from 7fb0a31 to a4240a7 Compare September 19, 2024 04:03
@WangWeiLin-MV WangWeiLin-MV marked this pull request as ready for review September 19, 2024 10:18
@BillyONeal BillyONeal merged commit 2af426b into microsoft:main Sep 19, 2024
6 checks passed
@BillyONeal
Copy link
Member

Thanks for the test!

@WangWeiLin-MV WangWeiLin-MV deleted the base-system-process/uint-exit-code branch September 20, 2024 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants