[Bug 642985] Review Request: rubygem-timecop - Provides a unified method to mock Time.now, Date.today in a single call

bugzilla at redhat.com bugzilla at redhat.com
Tue Nov 9 12:13:13 UTC 2010


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=642985

Michal Fojtik <mfojtik at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Flag|needinfo?(mfojtik at redhat.co |
                   |m)                          |

--- Comment #6 from Michal Fojtik <mfojtik at redhat.com> 2010-11-09 07:13:12 EST ---
(In reply to comment #3)
> By the way for bug 640608:
> 
> It seems that
> $ ruby -e 'otime = Time.now ; sleep(1) ; ctime=Time.now ; puts ctime - otime'
> will call system calls: gettimeofday -> select -> gettimeofday.
> 
> However it seems that select() sometimes sleeps less time than
> requested:
> http://lkml.org/lkml/2008/8/29/232
> ... which seems fixed in kernel 2.6.28. So RHEL5 host may suffer from
> this issue? (and perl seems to be using nanosleep instead of select)

Well, I AFAIK this bug is related just for Xen guests. Bare metal installations
of RHEL5 is not suffering with this. And it's issue in kernel as far as I
discussed with some kernel engineers.

(In reply to comment #4)
> Created attachment 454912 [details]
> Use nanosleep() instead of select() for ruby sleep()
> 
> If bug 640608 is related to select(), the attached patch may
> worth trying.

Yes definitely, this patch looks OK for solving this issue. I'll give it a try
today and send you the results.

+ Agree on disabling those tests (for now). All tests are now passed in Koji.

========================= -2 ===================
* Thu Nov 09 2010 Michal Fojtik <mfojtik at redhat.com> - 0.3.5-2
- Disabled test_time_stack_item test

Spec URL: http://mifo.sk/RPMS/rubygem-timecop.spec
SRPM URL: http://mifo.sk/RPMS/rubygem-timecop-0.3.5-2.fc14.src.rpm

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the package-review mailing list