-
Committer:
James Hunt
-
Date:
2013-12-12 11:54:03 UTC
-
Revision ID:
james.hunt@ubuntu.com-20131212115403-k2d0vo624vtb7dpc
* 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.