Skip to content

Add diagnostics for sporadic failures in a <format> test - #2494

Merged
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
StephanTLavavej:format-hexfloat-test
Jan 22, 2022
Merged

Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
StephanTLavavej:format-hexfloat-test

Conversation

@StephanTLavavej

Copy link
Copy Markdown
Member

The sporadic failure mentioned in #2449 has happened twice, in unrelated PRs, affecting both x86 and x64 (but curiously affecting clang-cl both times). We can't figure out why this is happening, so printing the return value of format() might help.

The output will look like this (with 2,000 zeroes, and there will be some difference between the strings):

Encountered sporadic failure GH-2449!
    str1: "1.34a1c000...000p+10"
expected: "1.34a1c000...000p+10"
DO NOT IGNORE/RERUN THIS FAILURE.
You must report it to the STL maintainers.
Assertion failed: false, file D:\GitHub\STL\tests\std\tests\P0645R10_text_formatting_formatting\test.cpp, line 829

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added test Related to test code format C++20/23 format labels Jan 20, 2022
cerr << " str1: \"" << str1 << "\"\n";
cerr << "expected: \"" << expected << "\"\n";
cerr << "DO NOT IGNORE/RERUN THIS FAILURE.\n";
cerr << "You must report it to the STL maintainers.\n";

This comment was marked as resolved.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We could, but I don't think it's necessary. charconv doesn't perform floating-point operations, especially the hexfloat codepath. The FPU's transistors are totally cold.

@StephanTLavavej

Copy link
Copy Markdown
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

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

Labels

format C++20/23 format test Related to test code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants