From ec4579a461c7bc1e28185f8955cb4b8a37563bd4 Mon Sep 17 00:00:00 2001 From: Kros Dai Date: Thu, 8 Oct 2026 16:44:15 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(test):=20skip=20exact=20zone?= =?UTF-8?q?=20match=20without=20tzdata.zi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - :bug: minimal containers lack the link table, so the exact china zone check failed on a correct profile Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g --- test/shell.d/region-pacman-test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/shell.d/region-pacman-test.sh b/test/shell.d/region-pacman-test.sh index c2289b21..938739b6 100644 --- a/test/shell.d/region-pacman-test.sh +++ b/test/shell.d/region-pacman-test.sh @@ -124,6 +124,8 @@ for profile in sorted((Path(os.environ["ROOT"]) / "default/regions").iterdir()): # The installer offers tzdata's backward-compatible names too, so China # covers every name that links to its two zones and nothing else. +# Without tzdata.zi (minimal containers) only the canonical zones can be +# checked, so completeness is enforced where the host has the link table. china = {zone for zone, region in owners.items() if region == "cn"} expected = {"Asia/Shanghai", "Asia/Urumqi"} tzdata = zoneinfo / "tzdata.zi" @@ -132,6 +134,8 @@ if tzdata.is_file(): fields = line.split() if len(fields) == 3 and fields[0] == "L" and fields[1] in {"Asia/Shanghai", "Asia/Urumqi"}: expected.add(fields[2]) -assert china == expected, (china, expected) + assert china == expected, (china, expected) +else: + assert expected <= china, (china, expected) PY pass "region profiles map each timezone to at most one region"