[libvirt PATCH 2/3] tests: virtimetest: Skip more tests near year's end

Andrea Bolognani abologna at redhat.com
Sat Jan 1 19:07:25 UTC 2022


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 <mprivozn at redhat.com>
Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 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",
-- 
2.31.1




More information about the libvir-list mailing list