~jamesodhunt/upstart/bug-530779-with-formatting-changes

Viewing all changes in revision 1543.

  • Committer: James Hunt
  • Date: 2013-11-28 14:33:06 UTC
  • Revision ID: james.hunt@ubuntu.com-20131128143306-uo4as41r90uh53h4
* 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.
* init/process.c:
  - 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/tests/test_job_process.c:
  - test_run(): Added new test that makes use of test_daemon.c:
    - "full double-fork daemon test where parent waits for ultimate child".
  - test_spawn(): Remove temp files.
  - test_kill(): Extra checks.
  - test_handler(): Remove erroneous UPSTART_LOGDIR code - not used by this test.
* 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:
  - _start_upstart(): Set Session Init name to "test_init" for
    consistency with TEST_DBUS() and to make it easier to distinguish from a
    legitimate Session Init.
  - get_test_daemon_binary(): New function.
  - file_line_count(): New function.
* test/test_util_common.h: TIMED_BLOCK(): New utility macro.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: