On Mon, Feb 09, 2009 at 09:14:52AM +0100, G?bor Melis wrote:
> On Lunes 09 Febrero 2009, Josh Elsasser wrote:
> > On Sat, Feb 07, 2009 at 02:00:46PM +0100, G?bor Melis wrote:
> > > The "i" constraint was somewhat optimistic, it relied on the
> > > compiler figuring out that make_fixnum(1) is a constant which
> > > breaks on gcc 3 and alos on gcc 4 with -O0.
> > >
> > > Fix pushed. Do the tests run happily?
> > It builds and runs on OpenBSD (x86), except two of the
> > timer.impure.lisp fail, (:TIMER :STRESS) and (:WITH-TIMEOUT
> > :TIMEOUT). For whatever reason, changing the (sleep 2) in the stress
> > test to (sleep 5) allows both tests to pass.
> Thank you for the feedback. I can see how a very slow system or more
> likely one with a low resolution system clock can fail to finish the
> stress test in time. But the (:with-timeout :timeout) test is not
> sensitive to that, maybe it failed because the timers from the stress
> test were still triggerring.
> In general, it's hard to write reliable timer tests because system load,
> clock resolution affect them.
OpenBSD has HZ at 100 by default, I'd imagine Linux defaults to 1000
or something even larger. CPU speed was certainly not an issue, this
was a very fast box that was almost entirely idle for the several
seconds it took for all the timers to trigger. When I isolated those
two tests and traced the SIGALRM callback function it did indeed
appear that the timers from the stress test affected the
(:with-timeout :timeout) test.