Skip to content

qa: unset LC_ALL in the check script to fix locale-dependent sort order#2587

Open
kurik wants to merge 1 commit intoperformancecopilot:mainfrom
kurik:locales
Open

qa: unset LC_ALL in the check script to fix locale-dependent sort order#2587
kurik wants to merge 1 commit intoperformancecopilot:mainfrom
kurik:locales

Conversation

@kurik
Copy link
Copy Markdown
Contributor

@kurik kurik commented May 7, 2026

When LC_ALL is set in the caller's environment (e.g. LC_ALL=en_US.utf8),
it overrides any per-command LC_COLLATE=POSIX setting used inside
individual QA tests, causing locale-sensitive sort ordering instead of
the expected POSIX byte-value ordering. This manifests as spurious
output mismatches in tests such as 821/1663 where metric names are
enumerated via "LC_COLLATE=POSIX sort".
Unsetting LC_ALL at the start of the check script removes the inherited
override while still allowing individual tests to apply their own
per-command locale settings (e.g. "LC_COLLATE=en_US.utf8 sort") as
intended by their authors.

  When LC_ALL is set in the caller's environment (e.g. LC_ALL=en_US.utf8),
  it overrides any per-command LC_COLLATE=POSIX setting used inside
  individual QA tests, causing locale-sensitive sort ordering instead of
  the expected POSIX byte-value ordering.  This manifests as spurious
  output mismatches in tests such as 821/1663 where metric names are
  enumerated via "LC_COLLATE=POSIX sort".
  Unsetting LC_ALL at the start of the check script removes the inherited
  override while still allowing individual tests to apply their own
  per-command locale settings (e.g. "LC_COLLATE=en_US.utf8 sort") as
  intended by their authors.
@kurik kurik requested a review from kmcdonell May 7, 2026 11:31
@kurik
Copy link
Copy Markdown
Contributor Author

kurik commented May 7, 2026

@kmcdonell May I ask you please for a review, to confirm this idea?
It hit me when I saw many tests to fail on my downstream test-bed , just because by an accident the LC_ALL was propagated from my workstation to the test-bed global environment.

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.

1 participant