Skip to content

Fix Intermittent tests/date/date-locale-hour.sh#11497

Open
sylvestre wants to merge 2 commits intouutils:mainfrom
sylvestre:intermitten-date-locale-hour
Open

Fix Intermittent tests/date/date-locale-hour.sh#11497
sylvestre wants to merge 2 commits intouutils:mainfrom
sylvestre:intermitten-date-locale-hour

Conversation

@sylvestre
Copy link
Copy Markdown
Contributor

No description provided.

Fixes intermittent: tests/date/date-locale-hour.sh

The GNU test date-locale-hour.sh picks 10 random locales via
`locale -a | shuf -n 10`. In CI, zh_CN.GB18030 is installed and its
date_fmt contains Chinese characters (年, 月, 日) encoded in GB18030,
which is not valid UTF-8.
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/tail-n0f is now passing!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 25, 2026

Merging this PR will degrade performance by 4.63%

❌ 1 regressed benchmark
✅ 299 untouched benchmarks
⏩ 46 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation sort_ascii_utf8_locale 15.4 ms 16.1 ms -4.63%

Comparing sylvestre:intermitten-date-locale-hour (630db93) with main (b7d1715)

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@sylvestre sylvestre marked this pull request as ready for review March 26, 2026 07:56

let format = if let Some(form) = matches.get_one::<String>(OPT_FORMAT) {
let format = if let Some(form) = matches.get_one::<OsString>(OPT_FORMAT) {
let form = form.to_string_lossy();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is not correct because GNU date doesn't use a lossy string:

$ cargo run -q date -d 2025-10-11T13:00 $'+\xFF%m' | hexdump -C
00000000  ef bf bd 31 30 0a                                 |...10.|
00000006
$ date -d 2025-10-11T13:00 $'+\xFF%m' | hexdump -C
00000000  ff 31 30 0a                                       |.10.|
00000004

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