Eddie, here follows a test case for testie:
%info Test that timers still go off after a system time adjustment. %require [ `whoami` = root ] expr `date +%s.%N` : '[0-9.]*' %script echo begin >OUT adjusted_now=`/home/rriggio/src/click/userlevel/click -e 'Script(print $(sub $(now) 1000), stop)'` /home/rriggio/src/click/userlevel/click -e 'Script(wait 1s, print >>OUT "timer1", wait 2s, print >>OUT "timer2", wait 2s)' & click="$!" echo presleep >>OUT sleep 2 echo adjusted >>OUT date -s @$adjusted_now >/dev/null 2>&1 sleep 10 echo postsleep >>OUT kill $click adjusted_now=`/home/rriggio/src/click/userlevel/click -e 'Script(print $(add $(now) 1000), stop)'` date -s @$adjusted_now %expect OUT begin presleep timer1 adjusted timer2 postsleep This is the output that i get (-V): userlevel/timer-systime-01.testie: Running... userlevel/timer-systime-01.testie:28: file OUT has unexpected value starting at line 5 userlevel/timer-systime-01.testie:28: OUT:5: expected 'timer2' userlevel/timer-systime-01.testie:28: OUT:5: but got 'postsleep' testie: 0 successes, 1 failure, 0 skipped Moreover, if I run your script 1 time out of 3 i get a fail. I'm using the userlevel driver. R. On 09/21/2010 10:58 PM, Eddie Kohler wrote: > Roberto, > > I wrote a Click test to verify this problem. And I didn't see a problem. > Things appear to work fine, at least on this version of Linux. > > The Click test is checked in here: > > http://www.read.cs.ucla.edu/gitweb?p=click;a=blob_plain;f=test/userlevel/timer-systime-01.testie > > You would run the test like "sudo PATH=PATH_INCLUDING_CLICK_BINDIR testie > .../timer-systime-01.testie". First remove the line that says "false". > > Please send mail if > - You can create a replicable test case in testie form > - You think the test I wrote is incorrect > > Thanks > Eddie > > > On 09/17/2010 03:47 AM, Roberto Riggio wrote: >> Hi, >> >> this is the problem: >> >> 1) re-schedule a timer: >> _timer.reschedule_after_msec(10000); >> >> 2) set the system time to a date that is in the past with respect to the >> current one >> >> 3) the timer never fires >> >> R. >> _______________________________________________ >> click mailing list >> [email protected] >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
