Skip to content

Fix: print diagnostics to stdout in s2n_resume_test#5660

Merged
CarolYeh910 merged 6 commits intoaws:mainfrom
ravindran-dev:fix-stdout-s2n-resume-test
Dec 23, 2025
Merged

Fix: print diagnostics to stdout in s2n_resume_test#5660
CarolYeh910 merged 6 commits intoaws:mainfrom
ravindran-dev:fix-stdout-s2n-resume-test

Conversation

@ravindran-dev
Copy link
Copy Markdown
Contributor

@ravindran-dev ravindran-dev commented Dec 10, 2025

Goal

Ensure diagnostic messages in s2n_resume_test are visible when running tests through CTest.

Why

CTest does not reliably surface output written to stderr, even when using --output-on-failure.
As a result, important diagnostic hints in s2n_resume_test were not visible whenever the test failed.

How

Replaced all fprintf(stderr, ...) diagnostic messages in s2n_resume_test with printf(...) so the output goes to stdout, which CTest reliably displays.

Callouts

  • No functional logic changed - only output streams.

  • This improves developer visibility during failures without altering test behavior.

Testing

Build

cd /home/ravi/s2n-tls
rm -rf build
mkdir build
cd build

cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build . -j8

Test

ctest -R s2n_resume_test --output-on-failure

Result

Diagnostic messages now appear correctly in test output.

Related

refs: #4112

Output:

image

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Copy Markdown
Contributor

@jmayclin jmayclin left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! It's probably worth pulling in the other stderr usages in test files as well.

@CarolYeh910 CarolYeh910 added this pull request to the merge queue Dec 23, 2025
Merged via the queue into aws:main with commit 6b31073 Dec 23, 2025
54 checks passed
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