guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. v2.1.0-816-gecc7987


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-816-gecc7987
Date: Wed, 26 Mar 2014 09:47:45 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=ecc7987427a32fb0748de05bcca0b65fb16a3b26

The branch, master has been updated
       via  ecc7987427a32fb0748de05bcca0b65fb16a3b26 (commit)
       via  56f79491c41e251cc35fb1c1bc9c8ec5f2d6b0da (commit)
      from  63b9e8b03f6eb6c87bb8fff8efa34831a69b8952 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ecc7987427a32fb0748de05bcca0b65fb16a3b26
Author: Andy Wingo <address@hidden>
Date:   Wed Mar 26 10:47:40 2014 +0100

    Sloppier matching in setitimer tests
    
    * test-suite/tests/signals.test: Update setitimer tests to sloppily
      match both times -- it seems that the interval can also be sloppy on
      some platforms, sadly.

commit 56f79491c41e251cc35fb1c1bc9c8ec5f2d6b0da
Author: Andy Wingo <address@hidden>
Date:   Wed Mar 26 10:35:53 2014 +0100

    Adapt test-out-of-memory to work on 32-bit systems
    
    * test-suite/standalone/test-out-of-memory (*limit*): Reduce limit to 50 MB.
      Adapt vector test to avoid exceeding maximum vector size on 32-bit
      systems.

-----------------------------------------------------------------------

Summary of changes:
 test-suite/standalone/test-out-of-memory |   10 ++++++----
 test-suite/tests/signals.test            |   19 ++++++++++++++-----
 2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/test-suite/standalone/test-out-of-memory 
b/test-suite/standalone/test-out-of-memory
index 0fc5a2e..bf55a41 100755
--- a/test-suite/standalone/test-out-of-memory
+++ b/test-suite/standalone/test-out-of-memory
@@ -17,8 +17,8 @@ exec guile -q -s "$0" "$@"
     (write "Skipping test.\n" (current-error-port))
     (exit 0)))
 
-;; 100 MB.
-(define *limit* (* 100 1024 1024))
+;; 50 MB.
+(define *limit* (* 50 1024 1024))
 
 (call-with-values (lambda () (getrlimit 'as))
   (lambda (soft hard)
@@ -36,8 +36,10 @@ exec guile -q -s "$0" "$@"
 (use-modules (rnrs bytevectors))
 
 (test (lambda ()
-        ;; A vector with a billion elements doesn't fit into 100 MB.
-        (make-vector #e1e9)))
+        ;; Unhappily, on 32-bit systems, vectors are limited to 16M
+        ;; elements.  Boo.  Anyway, a vector with 16M elements takes 64
+        ;; MB, which doesn't fit into 50 MB.
+        (make-vector (1- (ash 1 24)))))
 (test (lambda ()
         ;; Likewise for a bytevector.  This is different from the above,
         ;; as the elements of a bytevector are not traced by GC.
diff --git a/test-suite/tests/signals.test b/test-suite/tests/signals.test
index ec1c415..ef61aaa 100644
--- a/test-suite/tests/signals.test
+++ b/test-suite/tests/signals.test
@@ -29,6 +29,11 @@
 
   )
 
+(define (time-pair->secs secs-usecs-pair)
+  (match secs-usecs-pair
+    ((secs . usecs)
+     (+ secs (/ usecs 1e6)))))
+
 (when (defined? 'setitimer)
   (with-test-prefix "setitimer"
     (with-test-prefix "current itimers are 0"
@@ -48,12 +53,13 @@
                 '((0 . 0) (0 . 0))))
       (pass-if "reset to zero"
         (match (setitimer ITIMER_PROF 0 0 0 0)
-          (((1 . 0) (val-secs . val-usecs))
+          ((interval value)
            ;; We don't presume that the timer is strictly lower than the
            ;; value at which we set it, given its limited internal
            ;; precision.  Assert instead that the timer is between 2 and
            ;; 3.5 seconds.
-           (<= #e2e6 (+ (* val-secs #e1e6) val-usecs) #e3.5e6)))))
+           (and (<= 0.9 (time-pair->secs interval) 1.1)
+                (<= 2.0 (time-pair->secs value) 3.5))))))
 
     (with-test-prefix "usecs > 1e6"
       (pass-if "initial setting"
@@ -61,10 +67,13 @@
                 '((0 . 0) (0 . 0))))
       (pass-if "reset to zero"
         (match (setitimer ITIMER_PROF 0 0 0 0)
-          (((1 . 0) (val-secs . val-usecs))
+          ((interval value)
            ;; We don't presume that the timer is strictly lower than the
            ;; value at which we set it, given its limited internal
            ;; precision.  Assert instead that the timer is between 2 and
            ;; 3.5 seconds.
-           (and (<= #e2e6 (+ (* val-secs #e1e6) val-usecs) #e3.5e6)
-                (<= 0 val-usecs 999999))))))))
+           (and (<= 0.9 (time-pair->secs interval) 1.1)
+                (<= 2.0 (time-pair->secs value) 3.5)
+                (match value
+                  ((secs . usecs)
+                   (<= 0 usecs 999999))))))))))


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]