Skip to content

Commit ac66243

Browse files
committed
drop! t7810: turn MB_REGEX check into a lazy prereq
Cherry-pick of Patrick Steinhardt's upstream patch <20260604-pks-t7527-fix-tap-output-v3-5-7d766ed481e4@pks.im> ("[PATCH v3 5/8] t7810: turn MB_REGEX check into a lazy prereq", https://lore.kernel.org/git/20260604-pks-t7527-fix-tap-output-v3-5-7d766ed481e4@pks.im/). 414c2df ("t: let prove fail when parsing invalid TAP output", 2026-06-03) made `prove` reject TAP streams that contain non-TAP lines. t7810 had been computing the `MB_REGEX` prereq by running `LC_ALL=en_US.UTF-8 test-tool regex '^.$' '¿'` at the top level of the script. On AlmaLinux 8 the en_US.UTF-8 locale is not installed by default, so the shell printed "/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)" into the script's stdout, which prove now rejects with "Unknown TAP token". Move the check into a `test_lazy_prereq` block. The locale spelling is only evaluated when a test actually consults MB_REGEX, and the prereq subprocess's stderr is collected separately from the script's TAP stream, so the AlmaLinux 8 job no longer produces a stray TAP line. This is committed as drop! because Patrick's series is still under review on the mailing list; when it lands upstream, the next merging-rebase will drop this commit naturally. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent c0e9790 commit ac66243

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

t/t7810-grep.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ test_invalid_grep_expression() {
1818
'
1919
}
2020

21-
LC_ALL=en_US.UTF-8 test-tool regex '^.$' '¿' &&
22-
test_set_prereq MB_REGEX
21+
test_lazy_prereq MB_REGEX '
22+
LC_ALL=en_US.UTF-8 test-tool regex "^.$" "¿"
23+
'
2324

2425
cat >hello.c <<EOF
2526
#include <assert.h>

0 commit comments

Comments
 (0)