From 9be08892343cb7848b3e4b51c6e08b31a688ca7a Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Sat, 1 Jan 2022 19:39:40 +0100 Subject: [PATCH] tests: virtimetest: Skip more tests near year's end All of these are affected by the same issue as the ones that we're already skipping during this specific time interval. Suggested-by: Michal Privoznik Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump --- tests/virtimetest.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/tests/virtimetest.c b/tests/virtimetest.c index fffd189612..5447ba5721 100644 --- a/tests/virtimetest.c +++ b/tests/virtimetest.c @@ -177,26 +177,6 @@ mymain(void) TEST_LOCALOFFSET("VIR-00:30", 30 * 60); TEST_LOCALOFFSET("VIR-01:30", 90 * 60); - /* test DST processing with timezones that always - * have DST in effect; what's more, cover a zone with - * with an unusual DST different than a usual one hour - * - * These tests originally used '0' as the first day, - * but changed to '1' due to GLib GTimeZone parsing bug: - * https://gitlab.gnome.org/GNOME/glib/issues/1999 - * - * Once we depend on a new enough GLib, we can put then - * back to 0 again. - */ - TEST_LOCALOFFSET("VIR-00:30VID,1/00:00:00,364/23:59:59", - ((1 * 60) + 30) * 60); - TEST_LOCALOFFSET("VIR-02:30VID,1/00:00:00,364/23:59:59", - ((3 * 60) + 30) * 60); - TEST_LOCALOFFSET("VIR-02:30VID-04:30,1/00:00:00,364/23:59:59", - ((4 * 60) + 30) * 60); - TEST_LOCALOFFSET("VIR-12:00VID-13:00,1/00:00:00,364/23:59:59", - ((13 * 60) + 0) * 60); - /* experiments have shown that the following tests will fail * during certain hours of Dec 31 or Jan 1 (depending on the * TZ setting in the shell running the test, but in general @@ -209,6 +189,25 @@ mymain(void) * tests, except on Dec 31 and Jan 1. */ if (!isNearYearEnd()) { + /* test DST processing with timezones that always + * have DST in effect; what's more, cover a zone with + * with an unusual DST different than a usual one hour + * + * These tests originally used '0' as the first day, + * but changed to '1' due to GLib GTimeZone parsing bug: + * https://gitlab.gnome.org/GNOME/glib/issues/1999 + * + * Once we depend on a new enough GLib, we can put then + * back to 0 again. + */ + TEST_LOCALOFFSET("VIR-00:30VID,1/00:00:00,364/23:59:59", + ((1 * 60) + 30) * 60); + TEST_LOCALOFFSET("VIR-02:30VID,1/00:00:00,364/23:59:59", + ((3 * 60) + 30) * 60); + TEST_LOCALOFFSET("VIR-02:30VID-04:30,1/00:00:00,364/23:59:59", + ((4 * 60) + 30) * 60); + TEST_LOCALOFFSET("VIR-12:00VID-13:00,1/00:00:00,364/23:59:59", + ((13 * 60) + 0) * 60); TEST_LOCALOFFSET("VIR02:45VID00:45,1/00:00:00,364/23:59:59", -45 * 60); TEST_LOCALOFFSET("VIR05:00VID04:00,1/00:00:00,364/23:59:59",