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

printf: add fflush(stdout) at the end #2103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lakshmih
Copy link
Contributor

@lakshmih lakshmih commented Oct 4, 2024

Some platforms (Windows in our case) seem to need this.

@lakshmih lakshmih requested a review from svenvh October 4, 2024 16:29
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@lakshmih lakshmih requested a review from bashbaug October 4, 2024 16:29
@bashbaug
Copy link
Contributor

bashbaug commented Oct 4, 2024

Can you say a bit more why this is required? What are the symptoms before this change, and how does the change fix them?

I know the printf tests do some odd things with stdout, but the tests themselves (specifically, doTest) also have calls to fflush(stdout). Are we missing a call somewhere in doTest? Or, is there some reason why we still need this additional call in the test main function for some reason?

@nikhiljnv
Copy link
Contributor

@lakshmih
Are you seeing behavior similar to #1010 that you are trying to fix with this change?

@nikhiljnv nikhiljnv self-requested a review October 10, 2024 07:13
@lakshmih
Copy link
Contributor Author

lakshmih commented Oct 16, 2024

@nikhiljnv Not sure it is the same issue but essentially we don't get output from the print_results function in testHarness.cpp that prints the cumulative pass/fail result without the fflush.
@bashbaug The individual doTest messages do get flushed but it is the final pass / fail from the harness (see above) that is missing.

@svenvh
Copy link
Member

svenvh commented Nov 5, 2024

we don't get output from the print_results function in testHarness.cpp that prints the cumulative pass/fail result without the fflush.

Perhaps it makes more sense to move the fflush into the harness's print_results function then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants