Merge lp:~xnox/upstart/do-not-launch-session-dbus into lp:upstart

Proposed by Dimitri John Ledkov on 2014-05-07
Status: Merged
Merged at revision: 1620
Proposed branch: lp:~xnox/upstart/do-not-launch-session-dbus
Merge into: lp:upstart
Diff against target: 24 lines (+5/-2)
1 file modified
util/tests/test_initctl.c (+5/-2)
To merge this branch: bzr merge lp:~xnox/upstart/do-not-launch-session-dbus
Reviewer Review Type Date Requested Status
James Hunt 2014-05-07 Approve on 2014-05-08
Review via email: mp+218684@code.launchpad.net
To post a comment you must log in.
Dimitri John Ledkov (xnox) wrote :

START_UPSTART(upstart_pid, TRUE) launches startup event and thus launches dbus user session job, if one is installed among other things that may be installed. Which kind of borks up notify-dbus-address tests, since dbus-address maybe notified by dbus user session job ahead of us, as seen in adt test failures.

James Hunt (jamesodhunt) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'util/tests/test_initctl.c'
2--- util/tests/test_initctl.c 2014-04-11 18:51:23 +0000
3+++ util/tests/test_initctl.c 2014-05-07 19:12:35 +0000
4@@ -17263,7 +17263,10 @@
5 assert0 (unsetenv ("DBUS_SYSTEM_BUS_ADDRESS"));
6 assert0 (unsetenv ("DBUS_SESSION_BUS_ADDRESS"));
7
8- START_UPSTART (upstart_pid, TRUE);
9+ nih_local char **extra = NULL;
10+ extra = NIH_MUST (nih_str_array_new (NULL));
11+ NIH_MUST (nih_str_array_add (&extra, NULL, NULL,"--no-startup-event"));
12+ start_upstart_common (&(upstart_pid), TRUE, FALSE, NULL, NULL, extra);
13
14 /* Pass the D-Bus session bus address to the Session Init */
15 cmd = nih_sprintf (NULL, "%s notify-dbus-address \"%s\" 2>&1",
16@@ -17333,7 +17336,7 @@
17 assert0 (unsetenv ("DBUS_SYSTEM_BUS_ADDRESS"));
18 assert0 (unsetenv ("DBUS_SESSION_BUS_ADDRESS"));
19
20- START_UPSTART (upstart_pid, TRUE);
21+ start_upstart_common (&(upstart_pid), TRUE, FALSE, NULL, NULL, extra);
22
23 /* Pass the first D-Bus session bus address to the Session Init */
24 cmd = nih_sprintf (NULL, "%s notify-dbus-address \"%s\" 2>&1",

Subscribers

People subscribed via source and target branches