[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-148-g0f4f2
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-148-g0f4f2d9 |
Date: |
Wed, 11 Jan 2012 23:39:09 +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=0f4f2d9a3096f935f4e4f91ee437b7b5b16d20c8
The branch, stable-2.0 has been updated
via 0f4f2d9a3096f935f4e4f91ee437b7b5b16d20c8 (commit)
via ea3cef045a413aa1001cf13e1ea2bc150626c3ce (commit)
from f41ef416803b57473761b1963b0709312f36ddad (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 0f4f2d9a3096f935f4e4f91ee437b7b5b16d20c8
Author: Ludovic Courtès <address@hidden>
Date: Thu Jan 12 00:38:22 2012 +0100
Make sure `scm_spawn_thread' returns a thread.
* libguile/threads.c (scm_spawn_thread): Add an assertion that
DATA.thread is a thread. This assertion is sometimes hit on
x86_64-freebsd8.2.
commit ea3cef045a413aa1001cf13e1ea2bc150626c3ce
Author: Ludovic Courtès <address@hidden>
Date: Tue Jan 10 21:44:32 2012 +0100
Disable statprof tests on platforms that lack `ITIMER_PROF' support.
* test-suite/tests/statprof.test (when-implemented): New macro.
("statistical sample counts within expected range", "accurate call
counting"): Use it.
-----------------------------------------------------------------------
Summary of changes:
libguile/threads.c | 2 ++
test-suite/tests/statprof.test | 18 ++++++++++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/libguile/threads.c b/libguile/threads.c
index ad8720b..392f9fe 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -1132,6 +1132,8 @@ scm_spawn_thread (scm_t_catch_body body, void *body_data,
scm_i_scm_pthread_cond_wait (&data.cond, &data.mutex);
scm_i_pthread_mutex_unlock (&data.mutex);
+ assert (SCM_I_IS_THREAD (data.thread));
+
return data.thread;
}
diff --git a/test-suite/tests/statprof.test b/test-suite/tests/statprof.test
index b2ee41e..c711d5f 100644
--- a/test-suite/tests/statprof.test
+++ b/test-suite/tests/statprof.test
@@ -31,8 +31,22 @@
#:use-module (srfi srfi-1)
#:use-module (statprof))
+;; Throw `unresolved' upon ENOSYS. This is used to skip tests on
+;; platforms such as GNU/Hurd where `ITIMER_PROF' is is currently
+;; unimplemented.
+(define-syntax-rule (when-implemented body ...)
+ (catch 'system-error
+ (lambda ()
+ body ...)
+ (lambda args
+ (let ((errno (system-error-errno args)))
+ (false-if-exception (statprof-stop))
+ (if (= errno ENOSYS)
+ (throw 'unresolved)
+ (apply throw args))))))
+
(pass-if "statistical sample counts within expected range"
- (let ()
+ (when-implemented
;; test to see that if we call 3 identical functions equally, they
;; show up equally in the call count, +/- 30%. it's a big range, and
;; I tried to do something more statistically valid, but failed (for
@@ -80,7 +94,7 @@
(throw 'unresolved (pk average drift-fraction))))))))
(pass-if "accurate call counting"
- (let ()
+ (when-implemented
;; Test to see that if we call a function N times while the profiler
;; is active, it shows up N times.
(let ((num-calls 200))
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-148-g0f4f2d9,
Ludovic Courtès <=