Disable test for current value of setitimer on Cygwin
authorMichael Gran <spk121@yahoo.com>
Sun, 24 Feb 2019 07:23:19 +0000 (23:23 -0800)
committerMichael Gran <spk121@yahoo.com>
Sun, 24 Feb 2019 07:23:19 +0000 (23:23 -0800)
* test-suite/tests/signals.test ("current itimers are 0"): throws unresolved
    for cygwin

test-suite/tests/signals.test

index ac730a91e7f4a3d12e7591929b2baa96d8f32950..0b5570ae9a7ae322e5c35e9c444f43b7aa0f3922 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; signals.test --- test suite for Guile's signal functions       -*- scheme -*-
 ;;;;
-;;;; Copyright (C) 2009, 2014, 2017 Free Software Foundation, Inc.
+;;;; Copyright (C) 2009, 2014, 2017, 2019 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 (when (defined? 'setitimer)
   (with-test-prefix "setitimer"
     (with-test-prefix "current itimers are 0"
+
       (pass-if "ITIMER_REAL"
-        (equal? (setitimer ITIMER_REAL 0 0 0 0)
-                '((0 . 0) (0 . 0))))
+        ;; setitimer may have already been called in other tests.  For
+        ;; some versions of Cygwin, the return value of setitimer is
+        ;; invalid after an alarm has occurred.  See
+        ;; https://www.cygwin.com/ml/cygwin/2019-02/msg00395.html
+        (if (string-contains %host-type "cygwin")
+            (throw 'unresolved)
+            (equal? (setitimer ITIMER_REAL 0 0 0 0)
+                    '((0 . 0) (0 . 0)))))
+
       (pass-if "ITIMER_VIRTUAL"
         (if (not (provided? 'ITIMER_VIRTUAL))
             (throw 'unsupported)
             (equal? (setitimer ITIMER_VIRTUAL 0 0 0 0)
                     '((0 . 0) (0 . 0)))))
+
       (pass-if "ITIMER_PROF"
         (if (not (provided? 'ITIMER_PROF))
             (throw 'unsupported)