Skip to content

Commit a473c4e

Browse files
author
Sungin Kim
committed
no-mistakes(document): Clarify coverage-guard collation documentation
1 parent e9eefb3 commit a473c4e

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

‎bin/fm-test-run.sh‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,11 @@ select_lane() {
563563
}
564564

565565
# Every list below is built with `LC_ALL=C sort`, so every set operation over
566-
# those files must also run under LC_ALL=C. Under a UTF-8 collation `comm` reads
567-
# byte-sorted paths as unsorted (glibc's en_US.UTF-8 ignores `-` at the primary
568-
# weight, so "fm-backend.test.sh" collates before "fm-backend-tmux-smoke.test.sh"
569-
# while C orders them the other way), which makes `comm` emit a bogus
570-
# "not in sorted order" warning and either exit 1 or return a wrong set diff.
566+
# those files must also run under LC_ALL=C. Under dictionary-style collation,
567+
# `comm` can read byte-sorted paths as unsorted (glibc's en_US.UTF-8 ignores `-`
568+
# at the primary weight, so "fm-backend.test.sh" collates before
569+
# "fm-backend-tmux-smoke.test.sh" while C orders them the other way), which
570+
# makes `comm` emit a bogus warning and either exit 1 or return a wrong set diff.
571571
run_coverage_guard() {
572572
local tmp missing extra a b shard
573573
local -a saved_scripts=()

‎tests/fm-test-run.test.sh‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,12 +452,7 @@ test_portable_serial_shard_lane_refusals() {
452452
pass "portable serial shard lanes refuse mismatched, out-of-range, and countless names"
453453
}
454454

455-
# The coverage guard builds every list with `LC_ALL=C sort`, so its set
456-
# operations must run under LC_ALL=C too. Under a dictionary-collation locale
457-
# (glibc en_US.UTF-8 ignores `-` at the primary weight, so "fm-backend.test.sh"
458-
# collates before "fm-backend-tmux-smoke.test.sh" while C orders them the other
459-
# way) an ambient-locale `comm` reads the byte-sorted lists as unsorted, warns
460-
# "not in sorted order", and exits 1 under the runner's `set -e`.
455+
# Regression for the C-collation invariant documented by run_coverage_guard.
461456
test_coverage_guard_is_collation_independent() {
462457
local tmp loc probe divergent rc n
463458
tmp=$(mktemp -d "${TMPDIR:-/tmp}/fm-test-run-collation.XXXXXX")

0 commit comments

Comments
 (0)