lp:~jamesodhunt/upstart/bug-1199778
- Get this branch:
- bzr branch lp:~jamesodhunt/upstart/bug-1199778
Branch merges
- Dimitri John Ledkov: Needs Information
- James Hunt: Needs Resubmitting
-
Diff: 66798 lines (+66151/-170)13 files modifiedChangeLog (+65/-0)
init/Makefile.am (+3/-1)
init/job_class.c (+1/-1)
init/session.c (+10/-1)
init/state.c (+41/-53)
init/tests/data/upstart-session.json (+32985/-0)
init/tests/data/upstart-session2.json (+32436/-0)
init/tests/test_state.c (+410/-41)
init/tests/test_util.c (+60/-0)
init/tests/test_util.h (+8/-0)
po/upstart.pot (+73/-73)
test/test_util_common.c (+55/-0)
test/test_util_common.h (+4/-0)
Related bugs
Bug #1199778: upstart crashes if re-exec'ed with active chroot sessions | High | Fix Released |
Related blueprints
Branch information
Recent revisions
- 1513. By James Hunt
-
* init/tests/
test_state. c:
- test_session_serialise( ): Added new test "Ensure session
deserialisation does not create JobClasses" to assert
new session deserialisation behaviour.
- test_session_upgrade2( ): Finished writing this test - it now creates
a fake chroot path, updates the JSON so that all references to the
chroot session refer to the temporary chroot path, creates 2 jobs
and then performs the serialisation/deserialisation .
* init/tests/test_util. c:
- ensure_env_clean():
- Comments.
- Added log_unflushed_files.
- clean_env(): New function that re-initialises the common
data structures.
* test/test_util_common. c: search_ and_replace( ): New function. - 1512. By James Hunt
-
* init/tests/
data/upstart- session2. json: New JSON used by
test_session_ upgrade2( ).
* init/Makefile.am: Added upstart-session. json and upstart- session2. json
to TEST_DATA_FILES.
* init/conf.c: conf_source_deserialise_ all(): Assert that no conf
sources have yet been deserialised since now session deserialisation
avoids creating chroot conf sources (see below).
* init/job_class.c: job_class_deserialise_ all(): Formatting.
* init/session.c: session_deserialise_ all(): Don't create ConfSources
for each Session (since they are not actually used).
* init/tests/test_state. c:
- test_upgrade(): Call ensure_env_clean() both before each test and
after the last test to ensure it left the environment clean.
- test_session_upgrade( ): Clear up sessions.
- test_session_upgrade2( ): New test.
* init/tests/test_util. c: ensure_env_clean(): New function abstracted
from code in test_upgrade(). - 1511. By James Hunt
-
* init/state.
c:state_ deserialise_ resolve_ deps(): Updated based on review
comments. - 1510. By James Hunt
-
* init/state.c:
- state_deserialise_resolve_ deps(): Look up class conventionally using
name and session since existing indexing code unreliable as
referencing a hash.
- state_index_to_job_ class() : Removed.
* init/tests/test_state. c: test_session_ upgrade( ): Add check to ensure
session job with same name as NULL session job does not stop latter
being deserialised. - 1508. By Dimitri John Ledkov
-
* init/tests/data: upstart-
session. json: add stateful re-exec
tests with chroot session. (LP: #1200264)* init/state.c: state_deseriali
se_resolve_ deps(): properly account
at dependency resolution stage for skipped job_classes from chroot
sessions when those got deserialised. Fixes above unit test.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:upstart