[Merge] lp:~jamesodhunt/upstart/fix-test_state-test into lp:upstart
Dmitrijs Ledkovs
launchpad at surgut.co.uk
Wed Nov 13 11:38:46 UTC 2013
Review: Needs Fixing
timed_check() is essentially exec once in a lifetime, this is because: start_time & secs_to_wait are local static variables, which are set first time timed_check() is called & are never reset to 0, once the timing is complete.
Thus this is better to be done as a preprocessor macro.
So instead of timed_check(), would it be possible to use TEST_WATCH_UPDATE_TIMEOUT_SECS(secs) where TEST_FORCE_WATCH_UPDATE() was currently used?
Additional nih_io_watches asserts & init are all good.
ps. it looks like TEST_FORCE_WATCH_UPDATE_TIMEOUT_SECS & TEST_FORCE_WATCH_UPDATE_TIMEOUT are the same as TEST_FORCE_WATCH_UPDATE, since all three call _TEST_WATCH_UPDATE(1, timeout) and timeout is not used when force is 1.
pss. please note that select in _TEST_WATCH_UPDATE is rounded up, and in some cases ( when !have_timed_waitpid() ) it's rounded up to a hallarious value of 1 600 seconds or some such. (virtualised PPAs with acient XEN kernel / hyper visor)
--
https://code.launchpad.net/~jamesodhunt/upstart/fix-test_state-test/+merge/195031
Your team Upstart Reviewers is subscribed to branch lp:upstart.
More information about the upstart-devel
mailing list