lp:~jamesodhunt/upstart/bug-530779
- Get this branch:
- bzr branch lp:~jamesodhunt/upstart/bug-530779
Branch merges
- Steve Langasek: Needs Fixing
-
Diff: 24650 lines (+24167/-52)13 files modifiedChangeLog (+57/-0)
init/Makefile.am (+2/-1)
init/job.c (+17/-18)
init/job_process.c (+41/-6)
init/process.c (+27/-6)
init/process.h (+6/-0)
init/tests/data/upstart-1.12.json (+21708/-0)
init/tests/test_job_process.c (+483/-10)
init/tests/test_state.c (+190/-10)
test/Makefile.am (+8/-1)
test/test_daemon.c (+1485/-0)
test/test_util_common.c (+116/-0)
test/test_util_common.h (+27/-0)
Related bugs
Bug #530779: init: does not wait for parent to exit when following forks | Medium | In Progress |
Related blueprints
Branch information
Recent revisions
- 1581. By James Hunt
-
* init/tests/
test_job_ process. c: test_run_ subreaper( ): Separate the
prctl(PR_SET_ CHILD_SUBREAPER ) test into a new function and only call
if the running kernel supports that prctl.
* test/test_util_common. c: get_kernel_ version( ): New function. - 1580. By James Hunt
-
* init/tests/
data/upstart- 1.12.json: New test data file.
* test/test_daemon.c: New test utility.
* init/Makefile.am: Add "upstart-1.12.json" .
* init/job.c:
- Updated copyright.
- job_deserialise(): Generalise logic to handle missing pids when
upgrading from a version that does not support PROCESS_SECURITY and
PROCESS_DAEMON_ PARENT.
* init/job_process.c:
- Copyright and comments.
- job_process_terminated( ): Consider job ready when daemons parent
exits, rather than when the requisite number of forks have been
performed (based on lp:~vorlon/upstart/lp.530779-rough-draft)
(LP: #530779).
- job_process_trace_new( ): Corrected comment header.
- job_process_trace_new_ child() : Don't consider job ready once
requisite number of forks have occured any more.
- job_process_trace_fork( ): Save parent process.
* init/process.c:
- Updated copyright.
- process_name(): Added PROCESS_DAEMON_ PARENT for completeness.
- process_from_name( ): Added PROCESS_ DAEMON_ PARENT for completeness.
- process_deserialise_ all(): Generalise logic to handle missing pids
when upgrading from a version that does not support PROCESS_SECURITY and
PROCESS_DAEMON_ PARENT.
- process_type_enum_ to_str( ): Added PROCESS_ DAEMON_ PARENT for completeness.
- process_type_str_ to_enum( ): Added PROCESS_ DAEMON_ PARENT for completeness.
* init/process.h: Comments for ProcessType (which must be kept in order).
* init/tests/test_job_ process. c:
- test_run(): New test:
- "with daemon where parent waits for ultimate child before exiting"
- test_spawn(): Remove temporary files.
- test_kill(): Extra checks.
- test_handler():
- Remove erroneous UPSTART_LOGDIR code - not used by this test.
- Add daemon parent checks.
* init/tests/test_state. c:
- test_job_environ_ upgrade( ): Add additional checks to ensure that
json not containing PROCESS_DAEMON_ PARENT elements correctly deserialises
into empty elements.
- test_daemon_parent_ state() : New test that checks a data file containing
jobs with and without PROCESS_DAEMON_ PARENTS can be deserialised.
* test/Makefile.am: Updated for test_daemon.
* test/test_util_common. c:
- get_test_daemon_ binary( ): New function.
- file_line_count(): New function.
* test/test_util_common. h: TIMED_BLOCK(): New utility macro. - 1574. By James Hunt
-
* init/tests/
test_state. c: Remove unused variables to make test compile
in strict mode.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:upstart