Skip to content

printf: Error handling with unicode parsing #7681

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

Merged
merged 2 commits into from
Apr 12, 2025

Conversation

sargas
Copy link
Contributor

@sargas sargas commented Apr 7, 2025

This PR adds error handling when \uNNNN or \uNNNNNN is parsed. It also ignores the thousands seperator flag in format strings, which does not do anything for the "C" locale.

This PR should allow GNU's printf-cov to pass.

@sargas sargas force-pushed the pass-printf-cov-test branch from fbd4e0c to c8328bc Compare April 7, 2025 03:40
Copy link

github-actions bot commented Apr 7, 2025

GNU testsuite comparison:

GNU test failed: tests/printf/printf. tests/printf/printf is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/printf/printf-cov is no longer failing!

@sargas sargas force-pushed the pass-printf-cov-test branch from c8328bc to 77cb93f Compare April 7, 2025 04:17
Copy link

github-actions bot commented Apr 7, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/printf/printf-cov is no longer failing!

@sargas sargas force-pushed the pass-printf-cov-test branch from 77cb93f to 3a1c17c Compare April 7, 2025 04:52
Copy link

github-actions bot commented Apr 7, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/misc/tee is no longer failing!
Congrats! The gnu test tests/printf/printf-cov is no longer failing!

@RenjiSann RenjiSann force-pushed the pass-printf-cov-test branch from 3a1c17c to 50ceac7 Compare April 7, 2025 09:17
Copy link

github-actions bot commented Apr 7, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/printf/printf-cov is no longer failing!

@sargas sargas force-pushed the pass-printf-cov-test branch from 50ceac7 to 9aefd47 Compare April 7, 2025 16:05
Copy link

github-actions bot commented Apr 7, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/printf/printf-cov is no longer failing!

@sargas sargas force-pushed the pass-printf-cov-test branch from 9aefd47 to 5f281ef Compare April 8, 2025 12:00
Copy link

github-actions bot commented Apr 8, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/printf/printf-cov is no longer failing!

@sargas sargas force-pushed the pass-printf-cov-test branch from 5f281ef to fb74df2 Compare April 9, 2025 03:01
Copy link

github-actions bot commented Apr 9, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/printf/printf-cov is no longer failing!

@sargas sargas force-pushed the pass-printf-cov-test branch from fb74df2 to 92a194c Compare April 9, 2025 05:10
Copy link

github-actions bot commented Apr 9, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/printf/printf-cov is no longer failing!

@sargas sargas force-pushed the pass-printf-cov-test branch from 92a194c to 8c389b4 Compare April 9, 2025 11:21
Copy link

github-actions bot commented Apr 9, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/printf/printf-cov is no longer failing!

@sylvestre
Copy link
Contributor

Could you please add a test in tests/by-util/test_printf.rs ? thanks

@sargas sargas force-pushed the pass-printf-cov-test branch from 8c389b4 to 7df2205 Compare April 12, 2025 04:17
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/printf/printf-cov is no longer failing!

@sargas
Copy link
Contributor Author

sargas commented Apr 12, 2025

Could you please add a test in tests/by-util/test_printf.rs ? thanks

Sure, I've pushed some tests for these changes

Copy link
Collaborator

@jfinkels jfinkels left a comment

Choose a reason for hiding this comment

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

Congrats! The gnu test tests/printf/printf-cov is no longer failing!

Great!

@jfinkels jfinkels merged commit 5227178 into uutils:main Apr 12, 2025
69 checks passed
@sargas sargas deleted the pass-printf-cov-test branch April 12, 2025 17:27
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