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
1=== modified file 'src/seat-unity.c'
2--- src/seat-unity.c 2013-06-24 00:14:28 +0000
3+++ src/seat-unity.c 2013-06-26 02:45:34 +0000
4@@ -90,6 +90,10 @@
5 g_source_remove (seat->priv->compositor_timeout);
6 seat->priv->compositor_timeout = 0;
7
8+ /* Finished with the VT */
9+ vt_unref (seat->priv->vt);
10+ seat->priv->vt = -1;
11+
12 if (seat_get_is_stopping (SEAT (seat)))
13 {
14 SEAT_CLASS (seat_unity_parent_class)->stop (SEAT (seat));
15
16=== modified file 'tests/scripts/unity-autologin.conf'
17--- tests/scripts/unity-autologin.conf 2013-06-19 02:31:11 +0000
18+++ tests/scripts/unity-autologin.conf 2013-06-26 02:45:34 +0000
19@@ -10,7 +10,7 @@
20 #?RUNNER DAEMON-START
21
22 # System compositor starts
23-#?UNITY-SYSTEM-COMPOSITOR START
24+#?UNITY-SYSTEM-COMPOSITOR START VT=7
25 #?*UNITY-SYSTEM-COMPOSITOR READY
26
27 # X server starts
28
29=== modified file 'tests/scripts/unity-compositor-command.conf'
30--- tests/scripts/unity-compositor-command.conf 2013-06-21 03:42:40 +0000
31+++ tests/scripts/unity-compositor-command.conf 2013-06-26 02:45:34 +0000
32@@ -10,7 +10,7 @@
33 #?RUNNER DAEMON-START
34
35 # System compositor starts
36-#?UNITY-SYSTEM-COMPOSITOR START TEST
37+#?UNITY-SYSTEM-COMPOSITOR START VT=7 TEST=TRUE
38 #?*UNITY-SYSTEM-COMPOSITOR READY
39
40 # X server starts
41
42=== modified file 'tests/scripts/unity-compositor-fail-ready.conf'
43--- tests/scripts/unity-compositor-fail-ready.conf 2013-06-26 02:36:43 +0000
44+++ tests/scripts/unity-compositor-fail-ready.conf 2013-06-26 02:45:34 +0000
45@@ -9,13 +9,13 @@
46 #?RUNNER DAEMON-START
47
48 # System compositor starts but doesn't indicate it is ready
49-#?UNITY-SYSTEM-COMPOSITOR START
50+#?UNITY-SYSTEM-COMPOSITOR START VT=7
51
52 # Timeout and compositor is stopped
53 #?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
54
55 # X server starts in VT mode
56-#?XSERVER-0 START VT=8
57+#?XSERVER-0 START VT=7
58 #?XSERVER-0 INDICATE-READY
59
60 # LightDM connects to X server
61
62=== modified file 'tests/scripts/unity-compositor-fail-start.conf'
63--- tests/scripts/unity-compositor-fail-start.conf 2013-06-26 02:36:43 +0000
64+++ tests/scripts/unity-compositor-fail-start.conf 2013-06-26 02:45:34 +0000
65@@ -11,11 +11,11 @@
66 #?RUNNER DAEMON-START
67
68 # System compositor fails to start
69-#?UNITY-SYSTEM-COMPOSITOR START
70+#?UNITY-SYSTEM-COMPOSITOR START VT=7
71 #?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
72
73 # X server starts in VT mode
74-#?XSERVER-0 START VT=8
75+#?XSERVER-0 START VT=7
76 #?XSERVER-0 INDICATE-READY
77
78 # LightDM connects to X server
79
80=== modified file 'tests/scripts/unity-login.conf'
81--- tests/scripts/unity-login.conf 2013-06-19 02:31:11 +0000
82+++ tests/scripts/unity-login.conf 2013-06-26 02:45:34 +0000
83@@ -9,7 +9,7 @@
84 #?RUNNER DAEMON-START
85
86 # System compositor starts
87-#?UNITY-SYSTEM-COMPOSITOR START
88+#?UNITY-SYSTEM-COMPOSITOR START VT=7
89 #?*UNITY-SYSTEM-COMPOSITOR READY
90
91 # X server starts
92
93=== modified file 'tests/scripts/unity-switch.conf'
94--- tests/scripts/unity-switch.conf 2013-06-19 02:31:11 +0000
95+++ tests/scripts/unity-switch.conf 2013-06-26 02:45:34 +0000
96@@ -10,7 +10,7 @@
97 #?RUNNER DAEMON-START
98
99 # System compositor starts
100-#?UNITY-SYSTEM-COMPOSITOR START
101+#?UNITY-SYSTEM-COMPOSITOR START VT=7
102 #?*UNITY-SYSTEM-COMPOSITOR READY
103
104 # X server starts
105
106=== modified file 'tests/src/unity-system-compositor.c'
107--- tests/src/unity-system-compositor.c 2013-06-24 00:14:28 +0000
108+++ tests/src/unity-system-compositor.c 2013-06-26 02:45:34 +0000
109@@ -123,7 +123,9 @@
110 main (int argc, char **argv)
111 {
112 int i;
113+ GString *status_text;
114 gboolean test = FALSE;
115+ int vt_number = -1;
116
117 signal (SIGINT, signal_cb);
118 signal (SIGTERM, signal_cb);
119@@ -153,7 +155,7 @@
120 }
121 else if (strcmp (arg, "--vt") == 0)
122 {
123- //vt_number = atoi (argv[i+1]);
124+ vt_number = atoi (argv[i+1]);
125 i++;
126 }
127 else if (strcmp (arg, "--test") == 0)
128@@ -164,10 +166,13 @@
129
130 g_io_add_watch (g_io_channel_unix_new (from_dm_fd), G_IO_IN, read_message_cb, NULL);
131
132+ status_text = g_string_new ("UNITY-SYSTEM-COMPOSITOR START");
133+ if (vt_number >= 0)
134+ g_string_append_printf (status_text, " VT=%d", vt_number);
135 if (test)
136- status_notify ("UNITY-SYSTEM-COMPOSITOR START TEST");
137- else
138- status_notify ("UNITY-SYSTEM-COMPOSITOR START");
139+ g_string_append (status_text, " TEST=TRUE");
140+ status_notify (status_text->str);
141+ g_string_free (status_text, TRUE);
142
143 config = g_key_file_new ();
144 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