Skip to content

Monkeypatch test output with signal description#89

Closed
McSinyx wants to merge 1 commit intoGJDuck:masterfrom
UNIST-LOFT:strsignal
Closed

Monkeypatch test output with signal description#89
McSinyx wants to merge 1 commit intoGJDuck:masterfrom
UNIST-LOFT:strsignal

Conversation

@McSinyx
Copy link
Contributor

@McSinyx McSinyx commented Nov 13, 2024

Termination signal descriptions like "Illegal instruction" are printed by the invoking shell, not the running process, thus cannot be captured via stream redirection.

The more proper way to test for signals is probably saving them under a file like test/regtest/*.sig but it is less obvious what signal a number maps to when debugging.

I fail to understand why WIFEXITED(r) and WEXITSTATUS(r) - 128 works but (the supposedly semantically more correct according to the manual pages) WIFEXITED(r) and WTERMSIG(r) does not though.

Termination signal descriptions like "Illegal instruction"
are printed by the invoking shell, not the running process,
thus cannot be captured via stream redirection.

The more proper way to test for signals is probably
saving them under a file like test/regtest/*.sig
but it is less obvious what signal a number maps to
when debugging.
@McSinyx McSinyx mentioned this pull request Nov 18, 2024
@McSinyx McSinyx closed this Nov 18, 2024
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.

1 participant