lp:~jamesodhunt/upstart/daily-build-failure-env-debug

Created by James Hunt and last modified
Get this branch:
bzr branch lp:~jamesodhunt/upstart/daily-build-failure-env-debug
Only James Hunt can upload to this branch. If you are James Hunt please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
James Hunt
Project:
upstart
Status:
Development

Recent revisions

1365. By James Hunt

debug.

1364. By James Hunt

even more debug

1363. By James Hunt

* more debug.

1362. By James Hunt

* Added env debug.

1361. By James Hunt

init/man/init.5: Add further pty details.

1360. By James Hunt

Added missing changelog entry.

1359. By James Hunt

* init/job_class.c:
  - job_class_get_instance():
    - Use nih_local to avoid memory leak should nih_strcat_sprintf()
      fail.
    - Formatting.
  - job_class_start():
    - Use nih_local to avoid memory leak should nih_strcat_sprintf()
      fail.
    - Formatting.

1358. By James Hunt

* init/parse_job.c, init/job_class.c, init/job_class.h: Added "usage"
  stanza which is used by initctl command.
* init/tests/test_parse_job.c: Tests for "usage" stanza
* init/man/init.5: "usage" stanza documentation.
* util/initctl.c, util/man/initctl.8: Added "inictl usage" command.
* util/tests/test_initctl.c: Tests for ""inictl usage" command.

1357. By James Hunt

* init/log.c:
  - log_flush(): Comments.
  - log_read_watch():
    - Improved comments.
    - Don't re-attempt read on EAGAIN/EWOULDBLOCK since those errors are
      nominally impossible due to the remote end of the pty already
      having ended (LP: #926468).
    - Added a debug-mode warning when 'badly-behaved' application
      detected that leaks fds to its children, as this is generally a bug.
* init/tests/test_job_process.c:
  - test_run():
    - "with single line command writing fast and exiting": added
      waitpid() to ensure no EAGAIN.
  - test_spawn():
    - "with no such file, no shell and console log": added
      waitpid() to ensure no EAGAIN.

1356. By James Hunt

* init/job_process.c: job_process_spawn():
  - Set close-on-exec for pty_master.
  - Ensure stdio buffers flushed prior to forking to ensure no data
    leakage to child (should init be run with '--debug', or the tests
    be run with redirected output, for example).
  - Free log object if child process fails to exec(3) rather than just
    closing fd. This ensures io watch is removed correctly. (LP: #922754)
  - Only need to remap pty_master if CONSOLE_LOG in operation.
* init/tests/test_job_process:
  - fd_valid(): New helper function to determine if specified fd is valid.
  - child(): Added new 'TEST_FDS' test to ensure no fd leakage to child
    processes.
  - test_run():
    - New tests:
      - "ensure sane fds with no console, no script"
      - "ensure sane fds with no console, and script"
      - "ensure sane fds with console log, no script"
      - "ensure sane fds with console log, and script"
      - "with single-line command running an invalid command, then a 1-line post-stop script"
      - "with single-line command running an invalid command, then a 2-line post-stop script"
      - "with single-line command running an invalid command, then a post-stop command"
      - "with single-line command running an invalid command, then an invalid post-stop command"
      - "with single-line command running a valid command, then a 1-line invalid post-stop command"
    - Test "with single-line command running an invalid command":
      - now diverts stderr output for less chatty test-run experience.
      - Improved checking.
    - Test "with setuid me" now diverts stderr output for less chatty
      test-run experience.
  - test_spawn():
    - New tests:
      - "with no such file, no shell and console log"
      - "ensure sane fds with no console"
      - "ensure sane fds with console log"
* init/tests/test_log.c: test_log_destroy():
  - New test "ensure watch freed when log destroyed"

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:upstart
This branch contains Public information 
Everyone can see this information.

Subscribers