]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-time-util: restore relaxation of check is special timezones
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Thu, 19 Mar 2026 11:39:17 +0000 (12:39 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 19 Mar 2026 14:36:22 +0000 (14:36 +0000)
Fixup for 514fa9d39ae9935ef1e014a3dd48dd5856007df2. We are now getting
failures in CI i386 builds in Fedora rawhide:
  TZ=Europe/Lisbon, tzname[0]=WET, tzname[1]=WEST
  @212545617716594 → Sun 1976-09-26 00:26:57 WET → @212542017000000 → Sun 1976-09-26 00:26:57 CET
  src/test/test-time-util.c:450: Assertion failed: Expected "ignore" to be true

Restore the conditionalization for CAT, EAT, WET that was removed
in the refactoring.

src/test/test-time-util.c

index d3d4fd5f9b2e94ea336e691d662184c8312af187..04da9891cb73af15b5abdbb212c7d11862646c27 100644 (file)
@@ -439,7 +439,7 @@ static void test_format_timestamp_impl(usec_t x) {
          * Also, the same may happen on MSK timezone (e.g. Europe/Volgograd or Europe/Kirov). */
         bool ignore =
                 (streq_ptr(getenv("TZ"), "Africa/Windhoek") ||
-                 streq_ptr(get_tzname(/* dst= */ false), "MSK")) &&
+                 STRPTR_IN_SET(get_tzname(/* dst= */ false), "CAT", "EAT", "MSK", "WET")) &&
                 (x_sec > y_sec ? x_sec - y_sec : y_sec - x_sec) == 3600;
 
         log_full(ignore ? LOG_WARNING : LOG_ERR,