Skip to content

Abort tests when encountering NULL pointers#16

Merged
msteinert merged 1 commit into
mainfrom
return-after-abort
Aug 12, 2025
Merged

Abort tests when encountering NULL pointers#16
msteinert merged 1 commit into
mainfrom
return-after-abort

Conversation

@rdmark

@rdmark rdmark commented Aug 12, 2025

Copy link
Copy Markdown
Collaborator

Abort instead of assert on NULL pointer to avoid using NULL pointer as parameter in function where this leads to undefined behavior

Also, consistently use ck_abort() rather than ck_abort_msg() with message, since the messages are redundant to the context of a test failure

Abort instead of assert on NULL pointer to avoid using NULL pointer as parameter
in function where this leads to undefined behavior

Also, consistently use ck_abort() rather than ck_abort_msg() with message,
since the messages are redundant to the context of a test failure
@rdmark
rdmark requested a review from msteinert August 12, 2025 06:06
@rdmark
rdmark force-pushed the return-after-abort branch from 6335032 to ef7b926 Compare August 12, 2025 06:43
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
10.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@msteinert msteinert left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems unfortunate that libcheck asserts don't end the test execution. This looks good to me.

@msteinert
msteinert merged commit a299046 into main Aug 12, 2025
24 of 25 checks passed
@rdmark
rdmark deleted the return-after-abort branch August 12, 2025 18:23
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.

2 participants