The page cache is one directory per document; the shipped suites measure under a UTF-8 locale (from dev 3321e7c9e36e)

This commit is contained in:
ack committed 2026-10-19 00:44:35 +02:00
1 parent d09909a111
commit 73feb007c5
8 files changed
+51 -9

No files matched your search

+9 -4
View File
@@ -80,6 +80,11 @@ pass() { echo "${green}PASS${reset} $1"; PASS=$((PASS + 1)); }
fail() { echo "${red}FAIL${reset} $1"; [ -n "$2" ] && echo " $2"; FAIL=$((FAIL + 1)); }
# shows NAME PATTERN KDIAG_ARGS... — exits 0 and the output matches PATTERN.
# The MATCHING grep runs under a UTF-8 locale whatever the caller's: under C
# its "." matches a byte, and a pattern like "⟨@i.⟩" over a three-byte
# subscript fails as if kdiag were wrong (cases 28 and 30; TODO 78). Only
# the grep: kdiag itself runs under the caller's locale, so a locale
# dependency in the command would still show.
shows() {
local name="$1" pattern="$2"; shift 2
run "$KDIAG" "$@"
@@ -89,7 +94,7 @@ shows() {
if [ "$STATUS" -ne 0 ]; then
fail "$name" "exit $STATUS: $(printf '%s' "$OUT" | head -2)"; return
fi
if printf '%s' "$OUT" | grep -Eq -- "$pattern"; then
if printf '%s' "$OUT" | LC_ALL=C.UTF-8 grep -Eq -- "$pattern"; then
pass "$name"
else
fail "$name" "no match for [$pattern]; got: $(printf '%s' "$OUT" | head -2)"
@@ -106,7 +111,7 @@ absent() {
if [ "$STATUS" -ne 0 ]; then
fail "$name" "exit $STATUS: $(printf '%s' "$OUT" | head -2)"; return
fi
if printf '%s' "$OUT" | grep -Eq -- "$pattern"; then
if printf '%s' "$OUT" | LC_ALL=C.UTF-8 grep -Eq -- "$pattern"; then
fail "$name" "unexpected match [$pattern]"
else
pass "$name"
@@ -123,7 +128,7 @@ reports() {
if [ "$STATUS" -eq 0 ]; then
fail "$name" "expected a nonzero exit, got 0"; return
fi
if printf '%s' "$OUT" | grep -Eq -- "$pattern"; then
if printf '%s' "$OUT" | LC_ALL=C.UTF-8 grep -Eq -- "$pattern"; then
pass "$name"
else
fail "$name" "no match for [$pattern]; got: $(printf '%s' "$OUT" | head -2)"
@@ -245,7 +250,7 @@ reports "24a. the error advice names a way kdiag has" '@read sks/sks\.k @' \
absent_in_error() {
local name="$1" pattern="$2"; shift 2
run "$KDIAG" "$@"
if printf '%s' "$OUT" | grep -Eq -- "$pattern"; then
if printf '%s' "$OUT" | LC_ALL=C.UTF-8 grep -Eq -- "$pattern"; then
fail "$name" "unexpected match [$pattern]"
else
pass "$name"