Merge lp:~robert-ancell/lightdm/unity-sys-comp-release-vt2 into lp:~mir-team/lightdm/unity

Proposed by Robert Ancell
Status: Merged
Approved by: Robert Ancell
Approved revision: 1631
Merged at revision: 1633
Proposed branch: lp:~robert-ancell/lightdm/unity-sys-comp-release-vt2
Merge into: lp:~mir-team/lightdm/unity
Diff against target: 144 lines (+21/-12)
8 files modified
src/seat-unity.c (+4/-0)
tests/scripts/unity-autologin.conf (+1/-1)
tests/scripts/unity-compositor-command.conf (+1/-1)
tests/scripts/unity-compositor-fail-ready.conf (+2/-2)
tests/scripts/unity-compositor-fail-start.conf (+2/-2)
tests/scripts/unity-login.conf (+1/-1)
tests/scripts/unity-switch.conf (+1/-1)
tests/src/unity-system-compositor.c (+9/-4)
To merge this branch: bzr merge lp:~robert-ancell/lightdm/unity-sys-comp-release-vt2
Reviewer Review Type Date Requested Status
Robert Ancell Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+171190@code.launchpad.net

Commit message

Release the VT when the system compositor fails to start

To post a comment you must log in.
1630. By Robert Ancell

Clear VT value when done with it

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
1631. By Robert Ancell

Merge with Unity branch

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/seat-unity.c'
--- src/seat-unity.c 2013-06-24 00:14:28 +0000
+++ src/seat-unity.c 2013-06-26 02:45:34 +0000
@@ -90,6 +90,10 @@
90 g_source_remove (seat->priv->compositor_timeout);90 g_source_remove (seat->priv->compositor_timeout);
91 seat->priv->compositor_timeout = 0;91 seat->priv->compositor_timeout = 0;
9292
93 /* Finished with the VT */
94 vt_unref (seat->priv->vt);
95 seat->priv->vt = -1;
96
93 if (seat_get_is_stopping (SEAT (seat)))97 if (seat_get_is_stopping (SEAT (seat)))
94 {98 {
95 SEAT_CLASS (seat_unity_parent_class)->stop (SEAT (seat));99 SEAT_CLASS (seat_unity_parent_class)->stop (SEAT (seat));
96100
=== modified file 'tests/scripts/unity-autologin.conf'
--- tests/scripts/unity-autologin.conf 2013-06-19 02:31:11 +0000
+++ tests/scripts/unity-autologin.conf 2013-06-26 02:45:34 +0000
@@ -10,7 +10,7 @@
10#?RUNNER DAEMON-START10#?RUNNER DAEMON-START
1111
12# System compositor starts12# System compositor starts
13#?UNITY-SYSTEM-COMPOSITOR START13#?UNITY-SYSTEM-COMPOSITOR START VT=7
14#?*UNITY-SYSTEM-COMPOSITOR READY14#?*UNITY-SYSTEM-COMPOSITOR READY
1515
16# X server starts16# X server starts
1717
=== modified file 'tests/scripts/unity-compositor-command.conf'
--- tests/scripts/unity-compositor-command.conf 2013-06-21 03:42:40 +0000
+++ tests/scripts/unity-compositor-command.conf 2013-06-26 02:45:34 +0000
@@ -10,7 +10,7 @@
10#?RUNNER DAEMON-START10#?RUNNER DAEMON-START
1111
12# System compositor starts12# System compositor starts
13#?UNITY-SYSTEM-COMPOSITOR START TEST13#?UNITY-SYSTEM-COMPOSITOR START VT=7 TEST=TRUE
14#?*UNITY-SYSTEM-COMPOSITOR READY14#?*UNITY-SYSTEM-COMPOSITOR READY
1515
16# X server starts16# X server starts
1717
=== modified file 'tests/scripts/unity-compositor-fail-ready.conf'
--- tests/scripts/unity-compositor-fail-ready.conf 2013-06-26 02:36:43 +0000
+++ tests/scripts/unity-compositor-fail-ready.conf 2013-06-26 02:45:34 +0000
@@ -9,13 +9,13 @@
9#?RUNNER DAEMON-START9#?RUNNER DAEMON-START
1010
11# System compositor starts but doesn't indicate it is ready11# System compositor starts but doesn't indicate it is ready
12#?UNITY-SYSTEM-COMPOSITOR START12#?UNITY-SYSTEM-COMPOSITOR START VT=7
1313
14# Timeout and compositor is stopped14# Timeout and compositor is stopped
15#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=1515#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
1616
17# X server starts in VT mode17# X server starts in VT mode
18#?XSERVER-0 START VT=818#?XSERVER-0 START VT=7
19#?XSERVER-0 INDICATE-READY19#?XSERVER-0 INDICATE-READY
2020
21# LightDM connects to X server21# LightDM connects to X server
2222
=== modified file 'tests/scripts/unity-compositor-fail-start.conf'
--- tests/scripts/unity-compositor-fail-start.conf 2013-06-26 02:36:43 +0000
+++ tests/scripts/unity-compositor-fail-start.conf 2013-06-26 02:45:34 +0000
@@ -11,11 +11,11 @@
11#?RUNNER DAEMON-START11#?RUNNER DAEMON-START
1212
13# System compositor fails to start13# System compositor fails to start
14#?UNITY-SYSTEM-COMPOSITOR START14#?UNITY-SYSTEM-COMPOSITOR START VT=7
15#?UNITY-SYSTEM-COMPOSITOR EXIT CODE=115#?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
1616
17# X server starts in VT mode17# X server starts in VT mode
18#?XSERVER-0 START VT=818#?XSERVER-0 START VT=7
19#?XSERVER-0 INDICATE-READY19#?XSERVER-0 INDICATE-READY
2020
21# LightDM connects to X server21# LightDM connects to X server
2222
=== modified file 'tests/scripts/unity-login.conf'
--- tests/scripts/unity-login.conf 2013-06-19 02:31:11 +0000
+++ tests/scripts/unity-login.conf 2013-06-26 02:45:34 +0000
@@ -9,7 +9,7 @@
9#?RUNNER DAEMON-START9#?RUNNER DAEMON-START
1010
11# System compositor starts11# System compositor starts
12#?UNITY-SYSTEM-COMPOSITOR START12#?UNITY-SYSTEM-COMPOSITOR START VT=7
13#?*UNITY-SYSTEM-COMPOSITOR READY13#?*UNITY-SYSTEM-COMPOSITOR READY
1414
15# X server starts15# X server starts
1616
=== modified file 'tests/scripts/unity-switch.conf'
--- tests/scripts/unity-switch.conf 2013-06-19 02:31:11 +0000
+++ tests/scripts/unity-switch.conf 2013-06-26 02:45:34 +0000
@@ -10,7 +10,7 @@
10#?RUNNER DAEMON-START10#?RUNNER DAEMON-START
1111
12# System compositor starts12# System compositor starts
13#?UNITY-SYSTEM-COMPOSITOR START13#?UNITY-SYSTEM-COMPOSITOR START VT=7
14#?*UNITY-SYSTEM-COMPOSITOR READY14#?*UNITY-SYSTEM-COMPOSITOR READY
1515
16# X server starts16# X server starts
1717
=== modified file 'tests/src/unity-system-compositor.c'
--- tests/src/unity-system-compositor.c 2013-06-24 00:14:28 +0000
+++ tests/src/unity-system-compositor.c 2013-06-26 02:45:34 +0000
@@ -123,7 +123,9 @@
123main (int argc, char **argv)123main (int argc, char **argv)
124{124{
125 int i;125 int i;
126 GString *status_text;
126 gboolean test = FALSE;127 gboolean test = FALSE;
128 int vt_number = -1;
127129
128 signal (SIGINT, signal_cb);130 signal (SIGINT, signal_cb);
129 signal (SIGTERM, signal_cb);131 signal (SIGTERM, signal_cb);
@@ -153,7 +155,7 @@
153 }155 }
154 else if (strcmp (arg, "--vt") == 0)156 else if (strcmp (arg, "--vt") == 0)
155 {157 {
156 //vt_number = atoi (argv[i+1]);158 vt_number = atoi (argv[i+1]);
157 i++;159 i++;
158 }160 }
159 else if (strcmp (arg, "--test") == 0)161 else if (strcmp (arg, "--test") == 0)
@@ -164,10 +166,13 @@
164166
165 g_io_add_watch (g_io_channel_unix_new (from_dm_fd), G_IO_IN, read_message_cb, NULL);167 g_io_add_watch (g_io_channel_unix_new (from_dm_fd), G_IO_IN, read_message_cb, NULL);
166168
169 status_text = g_string_new ("UNITY-SYSTEM-COMPOSITOR START");
170 if (vt_number >= 0)
171 g_string_append_printf (status_text, " VT=%d", vt_number);
167 if (test)172 if (test)
168 status_notify ("UNITY-SYSTEM-COMPOSITOR START TEST");173 g_string_append (status_text, " TEST=TRUE");
169 else174 status_notify (status_text->str);
170 status_notify ("UNITY-SYSTEM-COMPOSITOR START");175 g_string_free (status_text, TRUE);
171176
172 config = g_key_file_new ();177 config = g_key_file_new ();
173 g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);178 g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);

Subscribers

People subscribed via source and target branches