systemd-shim
Test plan for component: systemd-shim
Component Checklist:
Trunk URL: https://github.com/hallyn/systemd-shim.git
Ubuntu Package URL (LP): lp:ubuntu/systemd-shim
Dependents/Clients
Overview
Due to the following two bugs, Upstart session jobs which specify the "cgroup" stanza could fail. The main user of this stanza is the ubuntu-app-launch (UAL) facility which is used to start most application on Touch devices:
Test Description
The following test plan checks to ensure expected behaviour when a job that specifies the "cgroup" stanza is run. It does this by creating an upstart job that specifies the cgroup stanza and runs that job a large number of times.
Testing for the absence of a race is difficult so ideally the "test-cgroup" job would be run as many times as possible to maximise the likelihood of hitting the timing window.
Expected Behaviour on a current Touch system
The test plan will probably fail after running "/sbin/start test-cgroup" less than 100 times (in other words it is easy to force the race).
However, please test on a device to see how often the problem occurs on your particular device. The outcome will give an indication as to how many iterations the test should be repeated for on a system with the latest versions of "upstart", "systemd-shim" and "cgmanager".
Test Plan
To check that cgroup support is working reliably with Upstart
Ensure upstart version 1.13.2~rtm-0ubuntu1 (or newer) is installed.
Ensure systemd-shim version 8 (or newer) is installed.
Ensure cgmanager version 0.32-1 (or newer) is installed.
- Force a logrotate:
# logrotate --force /etc/logrotate.conf
- Truncate the xsession log file:
echo > ~/.xsession-errors
Create a simple upstart job that uses the "cgroup" stanza by creating file "~phablet/.config/upstart/test-cgroup.conf" containing:
cgroup freezer exec cat /proc/self/cgroup
- Run the job multiple times in quick succession:
su - phablet for i in `seq 1027`; do /sbin/start test-cgroup; done
Ensure you do not get any output from "/sbin/start" stating, "start: Job failed to start"
- Ensure the xsession log file does not contain any messages like this:
init: Failed to spawn cgroup-test pre-start process: unable to enter cgroup: Unknown error 196609
Ensure that "/var/log/upstart/cgmanager.log" does not contain any errors like the following two types:
- "May not create" errors
cgmanager:do_create_main: pid XXXX (uid 32011 gid 32011) may not create under /run/cgmanager/fs/freezer
- "Invalid path" errors
cgmanager:per_ctrl_move_pid_main: Invalid path /run/cgmanager/fs/freezer/user.slice/user-32011.slice/session-32011.scope/upstart/test-cgroup
- "May not create" errors
- The following command should return 4 lines of output like this:
$ sort -u ~/.cache/upstart/test-cgroup.log 1:cpu:/user.slice/user-32011.slice/session-c2.scope 2:cpuacct:/user.slice/user-32011.slice/session-c2.scope 3:freezer:/user.slice/user-32011.slice/session-c2.scope/upstart/test-cgroup 4:name=systemd:/user.slice/user-32011.slice/session-c2.scope
Process/TestPlans/systemd-shim (last edited 2014-09-10 16:15:52 by host-78-147-28-227)