[16966] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: RFC: libverto nearing release

daemon@ATHENA.MIT.EDU (Ezra Peisach)
Tue Jul 5 23:17:03 2011

Message-ID: <4E13D3A8.50703@mit.edu>
Date: Tue, 05 Jul 2011 23:16:56 -0400
From: Ezra Peisach <epeisach@mit.edu>
MIME-Version: 1.0
To: krbdev@mit.edu
In-Reply-To: <1309447877.26530.14.camel@localhost>
Content-Type: multipart/mixed; boundary="------------070904020704090007000300"
Errors-To: krbdev-bounces@mit.edu

This is a multi-part message in MIME format.
--------------070904020704090007000300
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Putting my time where my mouth is

Two patches:

a) configure should say yes/no in terms of what support is being provided.
b) The timeout tests were failing for glib. Turns out glib timer support 
will subtract up to 10ms from the timer - based on a hash of 
DBUS/hostname environment variables. This resulted in tests failing as 
the timeout came in < 10ms...  Adjust times and explain reasoning.



--------------070904020704090007000300
Content-Type: text/plain;
 name="0002-Better-logging-of-what-compiling.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="0002-Better-logging-of-what-compiling.patch"

>From 861ba252b38c12b9f495548438bcbb27652918ff Mon Sep 17 00:00:00 2001
From: Ezra Peisach <peisach@rcsb.rutgers.edu>
Date: Mon, 4 Jul 2011 00:14:23 -0400
Subject: [PATCH] Better logging of what compiling

---
 configure.ac |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index eae420f..250178e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,8 @@ if test x$with_glib = xyes; then
 		echo "glib library requires glib-2.0!"
 		exit 1
 	fi
+else
+	with_glib=no
 fi
 AM_CONDITIONAL([WITH_GLIB], [test x$with_glib = xyes])
 
@@ -49,6 +51,8 @@ if test x$with_libev = xyes; then
 		echo "libev library requires libev!"
 		exit 1
 	fi
+else
+	with_libev=no
 fi
 AM_CONDITIONAL([WITH_LIBEV], [test x$with_libev = xyes])
 
@@ -65,6 +69,8 @@ if test x$with_libevent = xyes; then
 		echo "libevent library requires libevent >= 2.0!"
 		exit 1
 	fi
+else
+	with_libevent=no
 fi
 AM_CONDITIONAL([WITH_LIBEVENT], [test x$with_libevent = xyes])
 
@@ -81,6 +87,8 @@ if test x$with_tevent = xyes; then
 		echo "tevent library requires tevent!"
 		exit 1
 	fi
+else
+	with_tevent=no
 fi
 AM_CONDITIONAL([WITH_TEVENT], [test x$with_tevent = xyes])
 
-- 
1.5.5.6


--------------070904020704090007000300
Content-Type: text/plain;
 name="0003-Glib-timer-is-good-to-10ms.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="0003-Glib-timer-is-good-to-10ms.patch"

>From a38e4f474e49ba589bfaaa6bbe8b5b59d4ce39e7 Mon Sep 17 00:00:00 2001
From: Ezra Peisach <peisach@rcsb.rutgers.edu>
Date: Tue, 5 Jul 2011 20:06:23 -0400
Subject: [PATCH] Glib timer is good to -10ms

---
 tests/timeout.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/timeout.c b/tests/timeout.c
index 43b5c61..43ac2d1 100644
--- a/tests/timeout.c
+++ b/tests/timeout.c
@@ -26,7 +26,11 @@
 
 #include "test.h"
 
-#define SLEEP 10
+/* The glib timer will subtract a perterbation of up to 10ms based on your
+   DBUS session or HOSTNAME (see g_timeout_set_expiration).  So - sleep for 20,
+   check 10->40 */
+#define SLEEP_MIN 10
+#define SLEEP 20
 #define M2U(m) ((m) * 1000)
 
 static int callcount;
@@ -60,7 +64,7 @@ exit_cb(verto_ev_ctx *ctx, verto_ev *ev)
 static void
 cb(verto_ev_ctx *ctx, verto_ev *ev)
 {
-    assert(elapsed(SLEEP, SLEEP*2));
+    assert(elapsed(SLEEP_MIN, SLEEP*2));
     if (++callcount == 3)
         assert(verto_add_timeout(ctx, VERTO_EV_FLAG_NONE, exit_cb, NULL, SLEEP*2));
     else if (callcount == 2) {
-- 
1.5.5.6


--------------070904020704090007000300
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

--------------070904020704090007000300--

home help back first fref pref prev next nref lref last post