Merge lp:~jamesodhunt/upstart/fix-test_state-test into lp:upstart
Proposed by
James Hunt
Status: | Rejected |
---|---|
Rejected by: | James Hunt |
Proposed branch: | lp:~jamesodhunt/upstart/fix-test_state-test |
Merge into: | lp:upstart |
Diff against target: |
144 lines (+66/-4) 4 files modified
ChangeLog (+8/-0) init/tests/test_state.c (+21/-4) test/test_util_common.c (+34/-0) test/test_util_common.h (+3/-0) |
To merge this branch: | bzr merge lp:~jamesodhunt/upstart/fix-test_state-test |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dimitri John Ledkov | Needs Fixing | ||
Review via email: mp+195031@code.launchpad.net |
To post a comment you must log in.
Unmerged revisions
- 1570. By James Hunt
-
* init/tests/
test_state. c: test_log_ serialise( ):
- Added extra checks on nih_io_watches.
- Need to wait for logfile to be written to handle case where NIH
encounters EAGAIN.
* test/test_util_common. c: Added timed_check() utility function.
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)